Is there any npm module/ other way like React-Helmet that allows us to change page title as we route through our Angular application?
PS: I am using Angular 5.
You have a TitleService in Angular 5. Inject it in your component's constructor, and use the setTitle()
method.
import {Title} from "@angular/platform-browser";
....
constructor(private titleService:Title) {
this.titleService.setTitle("Some title");
}
Here are the docs from Angular: https://v2.angular.io/docs/ts/latest/cookbook/set-document-title.html