W3cubDocs

/Angular

DefaultTitleStrategy

The default TitleStrategy used by the router that updates the title using the Title service.

API

class DefaultTitleStrategy extends TitleStrategy {
  constructor(title: Title): DefaultTitleStrategy;
  updateTitle(snapshot: RouterStateSnapshot): void;
  override buildTitle(snapshot: RouterStateSnapshot): string | undefined;
  override getResolvedTitleForRoute(snapshot: ActivatedRouteSnapshot): any;
}

constructor

DefaultTitleStrategy
@paramtitleTitle

updateTitle

void

Sets the title of the browser to the given value.

@paramsnapshotRouterStateSnapshot
@returnsvoid

buildTitle

string | undefined
@paramsnapshotRouterStateSnapshot
@returnsstring | undefined

getResolvedTitleForRoute

any

Given an ActivatedRouteSnapshot, returns the final value of the Route.title property, which can either be a static string or a resolved value.

@paramsnapshotActivatedRouteSnapshot
@returnsany

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/router/DefaultTitleStrategy