NetanelBasal
2/8/2017 - 4:01 PM

filter7.component.ts

ngAfterViewInit() {
    const filters = this.filters.map(f => f.changeFilter);

    this.resources = combineLatest(...filters).pipe(
      map(( filters : ActiveFilter[] ) => 
           filters.map(filter => `${filter.group}=${filter.id}`).join("&"))
      switchMap(this.getData)
    );
}

getData( query ) {
  // Simulate HTTP request..
  return timer(1000).mapTo("https://api.com?" + query);
}