I have a BookDetailComponent component which is mapped for an url /books/:id. Is there any way in angular 2 router to make sure that this component is
BookDetailComponent
/books/:id
Yes, by implementing the OnActivate interface and returning a promise of the object you are waiting to load:
OnActivate
https://angular.io/docs/js/latest/api/router/OnActivate-interface.html