1.2.9 • Published 7 years ago

angular-nav-title v1.2.9

Weekly downloads
10
License
MIT
Repository
github
Last release
7 years ago

Simple straightforward page navigation titles.

This module requires Angular 2 router.

Demo

https://alex-craiu.github.io/angular-demo/

Installation

$ npm install --save angular-nav-title

Usage

  1. Import the module
import { NavTitleModule } from 'angular-nav-title';

@NgModule({
    ...
    imports: [NavTitleModule]
    ...
});
  1. Add the navTitle param to your route's data:
...
const routes: Routes = [
    {
        path: '',
        component: ArticlesComponent,
        data: { navTitle: 'Articles' },
        children: [
            { path: '', component: ArticleListComponent, data: { navTitle: 'List' } }
        ]
    }
];
...
  1. Insert the NavTitleComponent selector into app.component.html:
<nav-title></nav-title>

If navTitle isn't specified it won't render on screen. On title click, it navigates to the corresponding route.

Additional properties

Change the title separator (default: '–'):

<nav-title separator=">"></nav-title>

Change the param name (default: 'navTitle'):

<nav-title dataParam="breadcrumb"></nav-title>
1.2.9

7 years ago

1.2.8

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.1.0-alpha.1

7 years ago

1.0.0

7 years ago

0.0.0

7 years ago