first commit
This commit is contained in:
35
src/app/app.component.ts
Normal file
35
src/app/app.component.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { Component, ChangeDetectorRef } from '@angular/core';
|
||||
import { GlobalService } from './global.service';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.css']
|
||||
})
|
||||
export class AppComponent {
|
||||
|
||||
isActionInProgress = true;
|
||||
|
||||
constructor(
|
||||
private globalService: GlobalService,
|
||||
private cdref: ChangeDetectorRef,
|
||||
private router: Router
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.globalService.getLodingSuccess().subscribe({
|
||||
next: (data: boolean) => {
|
||||
this.isActionInProgress = data;
|
||||
},
|
||||
error: () => {
|
||||
this.isActionInProgress = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngAfterContentChecked() {
|
||||
this.cdref.detectChanges();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user