What is pipe() function in Angular 2?
问题 Pipes are filters for transforming data (formats) in the template. I came across the pipe() function as below. What does this pipe() function exactly mean in this case? return this.http.get<Hero>(url) .pipe( tap(_ => this.log(`fetched hero id=${id}`)), catchError(this.handleError<Hero>(`getHero id=${id}`)) ); 回答1: Don't get confused with the concepts of Angular and RxJS We have pipes concept in Angular and pipe() function in RxJS. 1) Pipes in Angular : A pipe takes in data as input and