cyberfly
10/8/2018 - 2:11 AM

Angular subscribe to query param id and fetch API

ngOnInit() {
  
 this.route.queryParamMap
  .switchMap((params: Params) =>
    this.service.fetchCardUuid(params.get('id')))
  .subscribe(
    card => {
      this.card = card;
      this.getVenueUuid(this.card);
    });
    
}