Simple page navigation titles
npm install angular-nav-titleSimple straightforward page navigation titles.
This module requires Angular 2 router.
https://alex-craiu.github.io/angular-demo/
``bash`
$ npm install --save angular-nav-title
1. Import the module
`ts
import { NavTitleModule } from 'angular-nav-title';
@NgModule({
...
imports: [NavTitleModule]
...
});
`
2. Add the navTitle param to your route's data:
`ts`
...
const routes: Routes = [
{
path: '',
component: ArticlesComponent,
data: { navTitle: 'Articles' },
children: [
{ path: '', component: ArticleListComponent, data: { navTitle: 'List' } }
]
}
];
...
3. Insert the NavTitleComponent selector into app.component.html:
`html`navTitle
If isn't specified it won't render on screen. On title click, it navigates to the corresponding route.
Change the title separator (default: '–'):
`html`
Change the param name (default: 'navTitle'):
`html``