@iodp/geodesc-navbar
v0.0.51
Published
GEODESC Navbar provides a common navbar UI element shared by GEODESC 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 occupi
Downloads
11
Keywords
Readme
GEODESC Navbar provides a common navbar UI element shared by GEODESC 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/geodesc-navbarImport GeodescNavbarModule into your app's Core module.
import { GeodescNavbarModule } from '@iodp/geodesc-navbar';
...
imports: [
...
GeodescNavbarModule
...
],
...Use your app's Core component to render the element:
...
template: '<geodesc-navbar><router-outlet></router-outlet></geodesc-navbar>
',
...Include something like the following in your app's startup service:
private _navbarLinks:NavbarLink[] = [
{
icon: 'open_in_new',
text: 'GEODESCAdmin',
url: 'some_link'
},
{
icon: 'open_in_new',
text: 'CatalogManager',
url: 'some_link'
}
]
private _navbarParams:NavbarParams = {
title: 'GEODESC DataCapture',
logoPath: 'some_path',
links: this._navbarLinks
}
constructor(private navbar:GeodescNavbarService) {
this.navbar.setNavbarParams(this._navbarParams);
}