Refactor: loading component

This commit is contained in:
shamoon
2024-12-06 00:26:38 -08:00
parent 0647812699
commit 65b48952cd
27 changed files with 267 additions and 258 deletions

View File

@@ -0,0 +1,23 @@
import { Subject } from 'rxjs'
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
import { Directive, OnDestroy } from '@angular/core'
@Directive()
export abstract class LoadingComponentWithPermissions
extends ComponentWithPermissions
implements OnDestroy
{
public loading: boolean = true
public reveal: boolean = false
protected unsubscribeNotifier: Subject<any> = new Subject()
constructor() {
super()
}
ngOnDestroy(): void {
this.unsubscribeNotifier.next(this)
this.unsubscribeNotifier.complete()
}
}