projects/app-base-library/src/lib/angular/components/base-app.component.ts
Properties |
|
Methods |
|
constructor(config: ConfigService, baseService: BaseService, elementRef: ElementRef)
|
||||||||||||
Parameters :
|
Public init | ||||||
init(options: any)
|
||||||
Parameters :
Returns :
any
|
Public initRouter | ||||
initRouter(router: )
|
||||
Parameters :
Returns :
void
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
Protected init | ||||||
init(settings: any)
|
||||||
Inherited from
Base
|
||||||
Defined in Base:35
|
||||||
Parameters :
Returns :
any
|
Public baseService |
baseService:
|
Type : BaseService
|
Public config |
config:
|
Type : ConfigService
|
Public el |
el:
|
Type : any
|
Public elementRef |
elementRef:
|
Type : ElementRef
|
Public routes |
routes:
|
Type : any
|
Default value : []
|
Public settings |
settings:
|
Type : any
|
Public translateService |
translateService:
|
Type : any
|
Private _environment |
_environment:
|
Type : any
|
Default value : { type: 'js', namespace: '_abl'}
|
Inherited from
Base
|
Defined in Base:8
|
Private _settings |
_settings:
|
Type : any
|
Default value : {}
|
Inherited from
Base
|
Defined in Base:9
|
Public settings |
settings:
|
Type : any
|
Default value : {}
|
Inherited from
Base
|
Defined in Base:10
|
import { Component, OnInit, ElementRef } from '@angular/core';
import { Base } from '../../shared/index';
import { BaseService, ConfigService } from '../services/index';
// todo: deprecated
@Component({
template: ''
})
export class BaseAppComponent extends Base implements OnInit {
public el: any;
// public config: any;
public routes: any = [];
public translateService: any;
public settings: any; // todo: deprecate
constructor(public config:ConfigService, public baseService: BaseService, public elementRef: ElementRef) {
super();
}
ngOnInit() {
this.el = this.elementRef.nativeElement;
this.settings = this.baseService.settings;
}
public init(options: any) {
return new Promise(function(resolve) {
this.baseService.initialize(options).then(resolve);
});
}
public initRouter(router) {
this.config.initRouter(router, this);
}
}