Angular · Junior · Question 60 of 75
How do you set the browser tab title for a route?
{ path: 'settings', component: Settings, title: 'Settings' }- ✓Correct answer: Use the
titleproperty of the route - 2Set
document.titleinmain.tsonly - 3Add a
<title>tag to the component template
Explanation
The router updates the title on navigation. A custom TitleStrategy can add a suffix like " | My App" to every page.