angular-common-module
Small collection of classes that we use across all projects
Install
npm i --save "angular-common-module" "ng2-toasty@4.0.3"
This also require angular-bootstrap-ui
(https://github.com/llafuente/angular-bootstrap-ui)
Base
Base is the class to extends all your components.
- Handle subscriptions, unsubscribe on ngDestroy
- Handle timeouts, clear them on ngDestroy
- Growls (using ng2-toasty)
- Parse route parameters (string/number)
- Get data from resolves
- Confirmation modals
We recomend to extends base with your own needs like handle HTTP errors, then extends directly your class.
Pipes
nl2br
Services
SessionStorageService
- set/get values in localStorage.
- You can subscribe to a key to see if change.
NOTE: Save objects as JSON
LogService
Proper loggin service with timestamp, color support, levels.
Component
RootComponent
Component used for "empty routes". It's just contains a router-outlet.
;; ;
publish
npm publish .
LICENSE
MIT