0.0.8 • Published 5 years ago

ngx-h2 v0.0.8

Weekly downloads
32
License
-
Repository
-
Last release
5 years ago

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
NameTypeDefaultDescription
logoUrlstringemptyUrl to source of logo image
pageTitlestringemptyTitle of app
menusMenuItem []nullList of link item
userUsernullMeta 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
NameTypeDefaultDescription
menusMenuItem []nullList of link item

ngx-h2-footer

Render footer of page

  • Example

<ngx-h2-footer title="Footer"> { custom content }</ngx-h2-footer>

  • Properties
NameTypeDefaultDescription
titlestringemptyFooter title

ngx-h2-login

Login form

  • Example

<ngx-h2-login (loginEvent)="login($event)" [meta]="loginMeta"></ngx-h2-login>

  • Properties of meta
NameTypeDefaultDescription
registerUrlstringemptyLink to register page
forgotUrlstringemptyLink to forgot password page
  • Event

    loginEvent: Callback when submit form

Returned value { username: string, password: string, isRemember: boolean }

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago