title: Angular observable.timer not updating url
body: <p>I have user observable.timer to fetch data after every one minute.Below is the code</p>
  
  <pre><code>getNewData(){
      var catId = this.serv.getSelectedCategory();
            var sinceId = this.myArray[0].userdataId;
              var dataurl = '';
              if (catId &lt; 0) {
                  dataurl = this.baseUrl +  '?bookMarked=' + isBookmarked + '&amp;count=' + this.count + '&amp;isPrevious=' + isPrevious + '&amp;sinceId=' + sinceId;
  
              }
              else {
                  dataurl = this.baseUrl + 'company/' + catId + '/abc' + '?bookMarked=' + isBookmarked + '&amp;count=' + this.count + '&amp;isPrevious=' + isPrevious + '&amp;sinceId=' + sinceId;
  
              }
  
              var self = this;
  
              var headers = new Headers();
              headers.append('Content-Type', 'application/x-www-form-urlencoded');
              headers.append('Authorization', token);
  
              return Observable.timer(60000,60000)
                  .switchMap(() =&gt; this.http.get(dataurl , { headers: headers, method: 'GET' }))
                  .map((res: Response) =&gt; {
                      var obj = res.json();
                      return obj;
                  });
  
          }
  </code></pre>
  
  <p>In the component</p>
  
  <pre><code>this.newDataSubscription = this.testServ.getNewData(false,false).subscribe(data =&gt; {
              this.newdataArray = this.serv.newdataArray ;
          })
  </code></pre>
  
  <p>The issue is the same url is being hit everytime the timer executes.I want to update the sinceId in the url based on the new data that is fetched.</p>
  
  <p>So everytime the timer executes the sinceId must be the 0th element of the array.</p>
  
  <p>Please Guide</p>