File

projects/app-base-library/src/lib/angular/components/base-app.component.ts

Extends

Base

Implements

OnInit

Metadata

Index

Properties
Methods

Constructor

constructor(config: ConfigService, baseService: BaseService, elementRef: ElementRef)
Parameters :
Name Type Optional
config ConfigService no
baseService BaseService no
elementRef ElementRef no

Methods

Public init
init(options: any)
Parameters :
Name Type Optional
options any no
Returns : any
Public initRouter
initRouter(router: )
Parameters :
Name Optional
router no
Returns : void
ngOnInit
ngOnInit()
Returns : void
Protected init
init(settings: any)
Inherited from Base
Defined in Base:35
Parameters :
Name Type Optional
settings any no
Returns : any

Properties

Public baseService
baseService: BaseService
Type : BaseService
Public config
config: ConfigService
Type : ConfigService
Public el
el: any
Type : any
Public elementRef
elementRef: ElementRef
Type : ElementRef
Public routes
routes: any
Type : any
Default value : []
Public settings
settings: any
Type : any
Public translateService
translateService: any
Type : any
Private _environment
_environment: any
Type : any
Default value : { type: 'js', namespace: '_abl'}
Inherited from Base
Defined in Base:8
Private _settings
_settings: any
Type : any
Default value : {}
Inherited from Base
Defined in Base:9
Public settings
settings: any
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);
    }

}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""