#StackBounty: #angular #typescript #observable Unable to get Interval data correctly using Angular 2+

Bounty: 50

Here i am displaying the dynamic data on the table and table will be generated based on the multi dropdown selection like.If i choose first dropdown based on that second dropdown will be generated and based on this a table will be generated here for every 30seconds i want to refresh the table/ update the table data previous i used setInterval() after googling i m using this method

return Observable.interval(30000).flatMap(()=>{ 
  return this.http.get(url + data+'/userid='+ param).map(res => { 
     return res.json(); 

import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/mergeMap`;

this above code working fine but the issue here is even though i select a value in the second dropdown it is displaying the previous values and all the dropdown values also suppose in the dropdown i have 1,2,3 in dropdown if selected 2 it is refreshing 2 for every 30 seconds along with that 1,3 also refreshing and im getting values of that also

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.