ngx-elvis-base
v1.0.15
Published
#### Install
Downloads
2
Readme
ngx-elvis-base [ElvisBaseModule]
Install
$ npm i -s ngx-elvis-base
Features
--- BaseClass
Provides basic Class features.
--- BaseComponent (extends BaseClass)
Provides basic Component features + basic Class features.
Attributes
// subscriptions attribute is used to store components subscriptions
subscriptions: any = {};
--- BasePage (extends BaseComponent)
Provides basic Page features + basic Component features.
--- BaseService (extends BaseClass)
Provides basic Service features + basic Class features.
Attributes
// events attribute is used to emit Service events
events: Subject<string> = new Subject();
--- BaseWebSocket (extends BaseService)
Provides basic WebSocket features + base Service features.
Attributes
// status (getter) attribute is used to retrieve current socket status based on socket STATUS_CODE
get status(): 'offline' | 'connecting' | 'online';
Methods (overridable)
// overridable methods to handle WebSocket events
onSend(message: any) { }
onError(err: any) { }
onMessage(event: any) { }
onOpen(event: any) { }
onClose(event: any) { }
--- Helpers
Generic useful Helpers, use as static methods.
Methods
Helpers.hash(length: number): string;
Helpers.styleScrollbars(elmt: HtmlDomElement): void;
Helpers.getURLParam(key: string): string;
Helpers.getFunctionsIcon(fns: any): void;
Helpers.fireEvent(node, eventName): void;
--- IconTranslator
Icon Translation helpers.
Methods
IconTranslator.iconForDepartment(departmentId: number): string;
--- Logger
Basic Logging features. Automatically disables in Production.
Methods
Logger.info(...args: any): void;
Logger.log(...args: any): void;
Logger.debug(...args: any): void;
Logger.warn(...args: any): void;
Logger.error(...args: any): void;