diff --git a/frontend_v2/src/app/components/publiclists/publiclists.component.html b/frontend_v2/src/app/components/publiclists/publiclists.component.html index ae92d8104b..7e691924c8 100644 --- a/frontend_v2/src/app/components/publiclists/publiclists.component.html +++ b/frontend_v2/src/app/components/publiclists/publiclists.component.html @@ -1,13 +1,13 @@ - + -
+
- +
- + diff --git a/frontend_v2/src/app/components/publiclists/publiclists.component.ts b/frontend_v2/src/app/components/publiclists/publiclists.component.ts index 2add1a954c..2c8524442e 100644 --- a/frontend_v2/src/app/components/publiclists/publiclists.component.ts +++ b/frontend_v2/src/app/components/publiclists/publiclists.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, OnInit, AfterViewChecked, ChangeDetectorRef } from '@angular/core'; import { AuthService } from '../../services/auth.service'; /** @@ -9,12 +9,36 @@ import { AuthService } from '../../services/auth.service'; templateUrl: './publiclists.component.html', styleUrls: ['./publiclists.component.scss'], }) -export class PubliclistsComponent { +export class PubliclistsComponent implements OnInit, AfterViewChecked { + + isAuth = false; + /** * Constructor. * @param authService + * @param changeDetector */ constructor( - public authService: AuthService + public authService: AuthService, + private cdRef : ChangeDetectorRef ) {} + + /** + * Component on Initialization. + */ + ngOnInit() { + this.isAuth = this.authService.isAuth; + } + + /** + * DEV MODE: + * For resolving change in expression value after it is checked + */ + ngAfterViewChecked() { + let isAuth = this.authService.isAuth; + if(isAuth != this.isAuth) { + this.isAuth = isAuth; + this.cdRef.detectChanges(); + } + } }