provideNgDocTitle
Builds the browser tab title of every navigation with a function that receives the categories, the page, the tab and the API declaration of the route, so titles like "Installation · Getting started | NgDoc" need no parsing of route titles.
Without it, Angular sets the title of the deepest route: the page's (or its tab's) title.
DeclarationTypeScript
function provideNgDocTitle (titleFn: NgDocTitleFn ): EnvironmentProviders ;Returns
Parameters
| Name | Type | Description |
|---|---|---|
| titleFn | | Builds the title; |
Example usage
provideNgDocTitle (({ categories, page, tab, api, title }) => {
const name = api ?? page;
return name
? [tab, name, ...[...categories].reverse()].filter(Boolean).join(' · ') + ' | My library'
: (title ?? 'My library');
});