1.0.0 • Published 5 years ago
rekord-szablon-navbar-2 v1.0.0
Installation
npm install rekord-szablon-navbar-2
Usage
Install ngx-bootstrap
npm install ngx-bootstrap
Add package and required modules to NgModule imports:
import {RekordNavbarModule} from 'rekord-navbar';
import {RouterModule} from '@angular/router';
@NgModule({
...
imports: [BrowserModule, RouterModule.forRoot([]), RekordNavbarModule, ...],
...
})
Download styles package from
\\phobos\users_home_folders\dbakalarski\paczka dla szablon-angular
Copy
assets
folder and paste it to your projectInclude styles in your project, depends on angular versions which you're using add this in
angular.json
orangular-cli.json
file :
"styles": [
"assets/bootstrap@4.3.1/bootstrap.min.css",
"assets/rekord/rstyle.css",
],
"scripts": [
"assets/bootstrap@4.3.1/bootstrap.min.js"
],
Usage example
<rekord-navbar title="Sample" [menu]="menu_structure" (onLogout)="logoutFunction()"></rekord-navbar>
Menu structure example
export interface IMenuItem {
id: number;
label: string;
link: string;
iconClass: string;
visibleInMainNav: boolean;
enabled: boolean;
active: boolean;
}
export const Menu: IMenuItem[] = [
{
id: 1,
label: 'Item 1',
link: '/item-1',
iconClass: 'icon-for-admin',
visibleInMainNav: true,
enabled: true,
active: false,
},
{
id: 2,
label: 'Item 2',
link: '/item-2',
iconClass: 'icon-doc_share',
visibleInMainNav: true,
enabled: true,
active: false,
}
]
1.0.0
5 years ago