node package manager

moni-controls

Angular 2 Controls as a library

<user-info> is a component that we can use for shows user's information and change the language of our application.

How to install

Open your Angular 2 Project and execute this:

npm install --save moni-controls

How to use UserInfoControl

To use this contorl you should write the following into NgModule:

import { TranslatePipe,UserInfoModule } from 'moni-controls/Controls/UserInfo';


@NgModule({
 declarations: [TranslatePipe],
 imports: [UserInfoModule.forRoot()],
   ...
})
export class MyAppModule {}

Simple example

  <user-info 
	      [name]="'Renato Salhuana'"
	      [rol]="'PDB Global Level'" 
	      [access]="'full access'" 
	      color="primary,warn,accent">
</user-info>

enter image description here

How to use MenuControl

To use this contorl you should write the following into NgModule:

import {MenuModule} from 'moni-controls/Controls/Menu';

@NgModule({
 imports: [MenuModule.forRoot()],
   ...
})
export class MyAppModule {}

Simple example

<moni-menu #Menu [itemsmenu]="ItemsMenu" color="primary,warn,accent"></moni-menu>

import {MenuItem } from 'moni-controls/Controls/Menu/MenuItem';

@ViewChild('Menu ') _MenuPrimary:Menu; AddMenuItem(title: string, url: string, icon: string) { this._MenuPrimary.AddMenuItem(new MenuItem('title', '/URL', 'icon')); }

enter image description here