[angular-16-irish-monitor]: Add rootClass subject in layout service.
(cherry picked from commit 246cafa43f
)
This commit is contained in:
parent
87fb820421
commit
0fe358c781
|
@ -83,7 +83,11 @@ export class LayoutService {
|
||||||
* Add hasStickyHeaderOnMobile: true in order to activate uk-sticky in header of mobile/tablet devices.
|
* Add hasStickyHeaderOnMobile: true in order to activate uk-sticky in header of mobile/tablet devices.
|
||||||
* */
|
* */
|
||||||
private hasStickyHeaderOnMobileSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
private hasStickyHeaderOnMobileSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||||
|
/**
|
||||||
|
* Add a class in root element of the html. (For different theme apply)
|
||||||
|
* Handle it manually in the component, it doesn't use data
|
||||||
|
* */
|
||||||
|
private rootClassSubject: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
|
|
||||||
ngOnDestroy() {
|
ngOnDestroy() {
|
||||||
|
@ -329,4 +333,12 @@ export class LayoutService {
|
||||||
setHasStickyHeaderOnMobile(value: boolean) {
|
setHasStickyHeaderOnMobile(value: boolean) {
|
||||||
this.hasStickyHeaderOnMobileSubject.next(value);
|
this.hasStickyHeaderOnMobileSubject.next(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get rootClass(): Observable<string> {
|
||||||
|
return this.rootClassSubject.asObservable();
|
||||||
|
}
|
||||||
|
|
||||||
|
setRootClass(value: string = null): void {
|
||||||
|
this.rootClassSubject.next(value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue