ngx-h2 v0.0.8
NgxH2
This library was generated with Angular CLI version 7.2.0.
Getting Started
Preinstallation:
yarn add jquery bootstrap
Then update your angular.json with something like:
"scripts": [
"node_modules/bootstrap/dist/js/bootstrap.js",
"node_modules/jquery/dist/jquery.js"
],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.css"
]
$ npm install ngx-h2 --save
$ yarn add ngx-h2
import { NgxH2Module } from 'ngx-h2';
@NgModule({ ..., imports: ..., NgxH2Module })
Components
ngx-h2-header
Display header info of page
- Example
<ngx-h2-header settings="headerSettings" (logoutEvent)="logout()">
- Properties of settings
Name | Type | Default | Description |
---|---|---|---|
logoUrl | string | empty | Url to source of logo image |
pageTitle | string | empty | Title of app |
menus | MenuItem [] | null | List of link item |
user | User | null | Meta data of userFact |
interface User { userName: string; profileImage: string; }
interface MenuItem { title: string; link: string; icon: string; subMenus: MenuItem[]; }
- Events logoutEvent: Callback when click on Logout button
ngx-h2-sidebar
Render sidebar menu with list of link
-Example
<ngx-h2-sidebar config="sidebarConfig">
- Properties of config
Name | Type | Default | Description |
---|---|---|---|
menus | MenuItem [] | null | List of link item |
ngx-h2-footer
Render footer of page
- Example
<ngx-h2-footer title="Footer"> { custom content }</ngx-h2-footer>
- Properties
Name | Type | Default | Description |
---|---|---|---|
title | string | empty | Footer title |
ngx-h2-login
Login form
- Example
<ngx-h2-login (loginEvent)="login($event)" [meta]="loginMeta"></ngx-h2-login>
- Properties of meta
Name | Type | Default | Description |
---|---|---|---|
registerUrl | string | empty | Link to register page |
forgotUrl | string | empty | Link to forgot password page |
- Event
loginEvent: Callback when submit form
Returned value { username: string, password: string, isRemember: boolean }