Fix Bug 2121: NG-UI uses unmaintained Chokidar version
- Upgraded Angular from 11 to 14 version to remove chokidar
unmaintained version.
- Changed linting tool tslint to eslint for angular 14 as tslint
is depreacted after angular 12
- Resolved linting issues from code
Change-Id: I00e908ab651db0f080e0d18a9d1c9711f4e36b91
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/services/AuthGuardService.ts b/src/services/AuthGuardService.ts
index 2effeca..512705f 100644
--- a/src/services/AuthGuardService.ts
+++ b/src/services/AuthGuardService.ts
@@ -45,6 +45,7 @@
* Returns Observable<boolean> if authorized @public
*/
public canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
+ // eslint-disable-next-line deprecation/deprecation
return combineLatest(
this.authService.isLoggedIn,
this.authService.isChangePassword
@@ -53,7 +54,9 @@
if (changePassword || isLoggedIn) {
return true;
} else {
- this.router.navigate(['/login']).catch();
+ this.router.navigate(['/login']).catch((): void => {
+ // Catch Navigation Error
+ });
this.authService.destoryToken();
return false;
}