Use the route’s `title` property. Angular’s default `TitleStrategy` updates `document.title` automatically. ```ts import { Routes } from '@angular/router'; export const routes: Routes = [ { path: 'dashboard', title: 'Dashboard', loadComponent: () => import('./dashboard/dashboard.component') .then(m => m.DashboardComponent), }, ]; ``` Configure the router: ```ts bootstrapApplication(AppComponent, { providers: [ provideRouter(routes, withComponentInputBinding()), ], }); ``` For dynamic titles, ...
Scanned 9/5/2026
Install to Claude Code
npx -y skills add HoangNguyen0403/agent-skills-standard --skill angular-routing --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Angular Routing?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-angular-routing-523945e7)More formats (shields.io, HTML) on the badges page.
Use the route’s `title` property. Angular’s default `TitleStrategy` updates `document.title` automatically.
```ts
import { Routes } from '@angular/router';
export const routes: Routes = [
{
path: 'dashboard',
title: 'Dashboard',
loadComponent: () =>
import('./dashboard/dashboard.component')
.then(m => m.DashboardComponent),
},
];
```
Configure the router:
```ts
bootstrapApplication(AppComponent, {
providers: [
provideRouter(routes, withComponentInputBinding()),
],
});
```
For dynamic titles, use a `ResolveFn<string>`:
```ts
export const userTitleResolver: ResolveFn<string> = route => {
const users = inject(UserService);
return users.get(route.paramMap.get('id')!).pipe(
map(user => `User: ${user.name}`)
);
};
export const routes: Routes = [
{
path: 'users/:id',
title: userTitleResolver,
resolve: { user: userResolver },
loadComponent: () =>
import('./user/user.component').then(m => m.UserComponent),
},
];
```
Keep title logic out of the route config; place it in a resolver. For application-wide formatting, provide a custom `TitleStrategy` extending `DefaultTitleStrategy`. Avoid deprecated class-based guards when adding route protection.
Is this your skill, or is something wrong with this listing? . Author removals are honored within 72 hours.
No comments yet. Be the first to comment!