Assuming I use the following expression to set the page title for the angular component in my router:
{path: 'view-move /: moveName', component: ViewMoveComponent, data: {title: 'View Move'}}
Assuming I use router parameters to get Move information, including its name, how can I put the move name inside my header, so it would be like this:
View Move: Move Name
Update: I tried:
import { BrowserModule, Title } from '@angular/platform-browser';
constructor(public http: Http,private route: ActivatedRoute,private titleService: Title) {
this.titleService.setTitle("My Title");
}
Now no title
source
share