Hii..everyone angular2 . There are many fetching process takes place in my project from server-side. I want to display the data fetching status at client side . Plase help me how can I make it possible.
in my
Component.ts I Used
constructor(private service: ReturnJsonService){}
Get(){
//alert(JSON.stringify(id));
this.service.Getdata().subscribe(data => this.obj1 = data);
this.service.Getname().subscribe(data => this.obj2 = data);
this.service.Getcost().subscribe(data => this.obj3 = data);
// these are the 3 fetching process that i used . I want to display fetching status in the screen
this.msg = "All the Details Fetched..!"
}
in
ReturnJsonService.ts
export class ReturnJsonService {
public req;
constructor( private http :Http) { }
Getdata(): Observable<any> {
.map(response => response.json())
}
Getname(): Observable<any> {
.map(response => response.json())
}
Getcost(): Observable<any> {
.map(response => response.json())
}
}
thanks in advance..