darekf77 / loading-info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple loading info component for Angular2 apps

Import ot

import { LoadingInfoComponent, LoadingInfoState } from 'loading-info/loading-info';

with itput

Include it

...
directives: [LoadingInfoComponent]
...

Use it

//inside html

<loading-info [id]="myID"></loading-info>

from component class

LoadingInfoComponent.startLoading( 'myID' );
LoadingInfoComponent.stopLoading(  'myID' );

or set on subscriber from rxjs

let sub = model.subscribe( data => console.log(data)  )
LoadingInfoComponent.setOn( 'myID' , sub );

About


Languages

Language:JavaScript 66.2%Language:HTML 19.8%Language:TypeScript 13.7%Language:SCSS 0.4%