AI Implementation feature(892): Admin Area General Settings and Categories 1.10 (#32)
This commit was merged in pull request #32.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { Component, OnDestroy, OnInit, inject } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
import { BootstrapService } from './core/services/bootstrap.service';
|
||||
import { BootstrapEventService } from './core/services/bootstrap-event.service';
|
||||
import { AuthService } from './core/services/auth.service';
|
||||
|
||||
@Component({
|
||||
@@ -9,11 +10,17 @@ import { AuthService } from './core/services/auth.service';
|
||||
imports: [RouterOutlet],
|
||||
template: `<router-outlet></router-outlet>`,
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
export class AppComponent implements OnInit, OnDestroy {
|
||||
private bootstrap = inject(BootstrapService);
|
||||
private auth = inject(AuthService);
|
||||
private readonly bootstrapEvent = inject(BootstrapEventService);
|
||||
async ngOnInit() {
|
||||
await this.bootstrap.load();
|
||||
await this.auth.restoreSession();
|
||||
this.bootstrapEvent.start();
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.bootstrapEvent.stop();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user