concept route parameter in category angular

This is an excerpt from Manning's book Angular in Action.
Handles route parameters —As you navigate, there are likely to be router parameters (such as the ID of the content item being viewed), and this is the best place to handle those parameters, which often determine what content to load from the back end.
The difference here is that the second part of this URL will change depending on the forum we want to view, because it contains the alias (which is the ID and title together). Angular supports this with route parameters, which are straightforward to implement. First let’s add a new route to our Forums module that will denote the path with a parameter. Open the src/app/forums/forums.module.ts file and add a new route to the
forumsRoutesarray, as you see here in bold:
Using this service, we’ll access the current parameter information. Open src/app/forums/forum/forum.component.ts and update the class as you see in the following listing. It will inject new services and handle getting access to the route parameters.
Listing 7.1 Forum component getting access to route parameters
export class ForumComponent implements OnInit { forum: Forum; constructor( private route: ActivatedRoute, #A private router: Router, #A private forumsService: ForumsService) { } ngOnInit() { this.route.params.subscribe((params: Params) => { #B this.forum = this.forumsService.forum(params['forum_alias']); #C if (!this.forum) this.router.navigate(['/not-found']); #D }); } }