title: Angular2: switchMap not canceling previous http calls
body: <p>I am trying to use switchMap to cancel any previous http calls in Angular2.
  The code is basically</p>
  
  <pre><code>var run = ():Observable&lt;any&gt; =&gt; {
          var url = 'http://...'
          return this._http.get(url)
              .map(result =&gt; {
                  return var xmlData:string = result.text()
  
              });
      }
  
  
      function pollTasks() {
          return Observable.of(1)
              .switchMap(() =&gt; run())
              .map(res =&gt; res)
      }
  
      // caller can do subscription and store it as a handle:
      let tasksSubscription =
          pollTasks()
              .subscribe(data =&gt; {
                  console.log('aa'+data)
              });
  </code></pre>
  
  <p>and so I call the entire source several times in a row and receive several replies (i.e.: aa+data)</p>
  
  <p>I was under the impression switchMap should cancel the previous calls.</p>