app.component.ts 779 Bytes
import { Component, OnInit } from '@angular/core';
import { ApplicationService } from './services/application.service';
import { UpdateUserService } from './services/update-user.service';

@Component({
    selector: 'my-app',
    templateUrl: './app/app.component.html',
    providers: [ApplicationService, UpdateUserService]

})
export class AppComponent implements OnInit {
    constructor(private application: ApplicationService) { }

    ngOnInit(): void {
        if (this.application.currentUser != null) {
            this.application.getAppSettings("Administration").subscribe((appSettings) => {
                this.application.appSettings = appSettings;
                this.application.appSettingsLoaded = true;
            });
        }
    }
}