0
0
JRJose Romero
The code creates a custom pipe that uses the JavaScript map function to take the parameters from the route and pass them onto the tap function. The tap function then uses the this.id variable to identify the particular id parameter that was requested.
Library: angular
Shortcut: angular.routes.params.subscribe
this.route.paramMap
.pipe(map(params => params.get('id')), tap(id => (this.id = +id)))
.subscribe(id => {});