title: how to stop interval in angular?
body: <p>I am using rxjs6 interval in my angular6 application.Following is my code to implement interval in angular6 app.</p>
  
  <p><strong>app.component.ts</strong></p>
  
  <pre><code>import { interval } from 'rxjs/observable/interval';
  const source = interval(1000);
  const subscribe = source.subscribe(val =&gt; console.log(val));
  </code></pre>
  
  <p>everything works fine, but how can I stop this interval ?.When I tried with unsubscribe angular says that <code>source.unsubscribe is not a function</code> </p>