@iodp/iodp-navbar
v0.0.57
Published
IODP Navbar provides a common navbar UI element shared by IODP apps. The navbar element contains a `<ng-content>` element which is used to display other app content, likely through providing it with a `<router-outlet>`. The ng-content element occupies all
Downloads
2
Keywords
Readme
IODP Navbar provides a common navbar UI element shared by IODP apps. The navbar element contains a <ng-content>
element which is used to display other app content, likely through providing it with a <router-outlet>
. The ng-content element occupies all space not used by the navbar.
To use this component complete the following steps:
Install the package.
npm install @iodp/iodp-navbarImport IODPNavbarModule into your app's Core module.
import { IODPNavbarModule } from '@iodp/iodp-navbar';
...
imports: [
...
IODPNavbarModule
...
],
...Use your app's Core component to render the element:
...
template: '<iodp-navbar><router-outlet></router-outlet></iodp-navbar>
',
...Include something like the following in your app's startup service:
private _navbarLinks:NavbarLink[] = [
{
icon: 'open_in_new',
text: 'IODPAdmin',
url: 'some_link'
},
{
icon: 'open_in_new',
text: 'CatalogManager',
url: 'some_link'
}
]
private _navbarParams:NavbarParams = {
title: 'IODP DataCapture',
logoPath: 'some_path',
links: this._navbarLinks
}
constructor(private navbar:IODPNavbarService) {
this.navbar.setNavbarParams(this._navbarParams);
}