title: Is there a possibility to log an event if the value changes?
body: <p>I had an idea to show the connection status of an usb-device via angular application.</p>
  <p>My idea is, if the device is connected to the pc, a program sends via HTTP-Post Request the value 1 to a server (every 1s) or 0 if disconnected. Then the angular application gets the value via GET-Request.</p>
  <p>The code below shows some part of the angular project receiving the values:</p>
  <p><strong>ts</strong></p>
  <pre class="lang-js prettyprint-override"><code>import { interval } from 'rxjs';
  ...
  constructor(private httpClient : HttpClient) {
    interval(1000).subscribe(x =&gt; {
      this.getRequest();
    });
  }
  
  status : string = '';
  
  getRequest(){
    this.httpClient.get&lt;Notification&gt;('.../notification/1')
    .subscribe(notification =&gt; {
      this.status = notification.status;
    });
  }
  </code></pre>
  <p><strong>html</strong></p>
  <pre class="lang-html prettyprint-override"><code>&lt;div *ngIf= &quot;status === '1'&quot;&gt;
    &lt;img src=&quot;/assets/icons/run.png&quot;&gt;
  &lt;/div&gt;
  &lt;div *ngIf= &quot;status === '0'&quot;&gt;
    &lt;img src=&quot;/assets/icons/stop.png&quot;&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Currently all works fine.</p>
  <p>For the next step I want to give out a message via console.log, if the value change from 0 to 1 or vice versa, but don't have an idea.</p>