public prj1: string[] = []; public prj2: string[] = []; ngOnInit() { this.getProj1(); this.getProj2(); } getProj1() { this.service['pj1'].get().subscribe(data => { this.prj1 = data; }); } getProj2() { this.service['pj2'].get().subscribe(data => { this.prj2 = data; }); }
this.service
let one= this.service['pj1'].get(); let two= this.service['pj2'].get(); forkJoin([one, two]).subscribe(results => { console.log(results[0]); console.log(results[1]);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)