title: Angular WebSocket How to fetch data from a live outputstream in Angular Services
body: <p>I am creating a project for the first time on web socket and I need help.</p>
  <p>live outputstreamlink: <a href="https://wunder-provider.herokuapp.com/" rel="nofollow noreferrer">https://wunder-provider.herokuapp.com/</a>
  This is what I have implemented so far:</p>
  <p>**This is a live output stream that generates random user information every 3 to 15 seconds. I am creating an Angular IONIC application that displays these users on the screen with their information. **</p>
  <p>THE PROBLEM HAS BEEN SOLVED</p>
  <pre><code>  users :User[];
    subject = webSocket({url:&quot;wss://wunder-provider.herokuapp.com/socket.io/?EIO=3&amp;transport=websocket&quot;,
    deserializer: ({data}) =&gt; {
      if(data.startsWith(&quot;42&quot;))
       return JSON.parse(data.substring(2))[1];
     else 
     return null;
       
    }
   });
    getAll() {
    this.users = [];
        this.subject.subscribe(
     msg =&gt;{
  //   console.log('message received: ' + msg), // Called whenever there is a message from the server.
          if(msg!=null &amp;&amp; msg.results != null){
              msg.results.forEach(r=&gt;{
        this.users.push(r);
        
              });
          }
     },
     err =&gt; console.log(err), // Called if at any point WebSocket API signals some kind of error.
     () =&gt; console.log('complete') // Called when connection is closed (for whatever reason).
   );
   return this.users;
    }
  </code></pre>