Below is my code, how to use (this.categoryType) in other component
getCategoryDetails(){
return this.http.get('ip/ramu/api/api/…')
.map((res:Response) => res.json());
}
Above code I am using in webservice.ts
ngOnInit() { this.wsp.getCategoryDetails().subscribe(data => {
this.categoryType = data; });
}
Above code I have used in home.ts, but I want use this response in other component.
See Question&Answers more detail:os