Update angular to version 16

This commit is contained in:
Konstantinos Triantafyllou 2023-08-24 16:31:24 +03:00
parent 145cd1dd94
commit 93cdc71cf0
5 changed files with 8 additions and 14 deletions

View File

@ -1,6 +1,6 @@
import { Injectable, Inject, PLATFORM_ID } from '@angular/core'; import { Injectable, Inject, PLATFORM_ID } from '@angular/core';
import { HttpInterceptor, HttpRequest, HttpHandler } from '@angular/common/http'; import { HttpInterceptor, HttpRequest, HttpHandler } from '@angular/common/http';
import { TransferState } from '@angular/platform-browser'; import { TransferState } from '@angular/core';
import { properties } from "../../environments/environment"; import { properties } from "../../environments/environment";
@Injectable({ @Injectable({

View File

@ -1,13 +1,13 @@
import {Observable} from 'rxjs'; import {Observable} from 'rxjs';
import {take, tap} from 'rxjs/operators'; import {take, tap} from 'rxjs/operators';
import {Injectable} from '@angular/core'; import {Injectable} from '@angular/core';
import {ActivatedRouteSnapshot, CanActivate, Data, Router, RouterStateSnapshot, UrlTree} from '@angular/router'; import { ActivatedRouteSnapshot, Data, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
import {ConfigurationService} from '../utils/configuration/configuration.service'; import {ConfigurationService} from '../utils/configuration/configuration.service';
import {ConnectHelper} from '../connect/connectHelper'; import {ConnectHelper} from '../connect/connectHelper';
import {properties} from "../../../environments/environment"; import {properties} from "../../../environments/environment";
@Injectable() @Injectable()
export class IsRouteEnabled implements CanActivate { export class IsRouteEnabled {
constructor(private router: Router, constructor(private router: Router,
private config: ConfigurationService) { private config: ConfigurationService) {

View File

@ -2,7 +2,7 @@ import { Injectable, Inject, PLATFORM_ID } from '@angular/core';
import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpResponse } from '@angular/common/http'; import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpResponse } from '@angular/common/http';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { tap } from 'rxjs/operators'; import { tap } from 'rxjs/operators';
import { TransferState, makeStateKey, StateKey } from '@angular/platform-browser'; import { TransferState, makeStateKey, StateKey } from '@angular/core';
import { isPlatformServer } from '@angular/common'; import { isPlatformServer } from '@angular/common';
import {properties} from "../../environments/environment"; import {properties} from "../../environments/environment";

View File

@ -1,16 +1,10 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { import { Router, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from '@angular/router';
Router,
CanActivate,
ActivatedRouteSnapshot,
RouterStateSnapshot,
UrlTree
} from '@angular/router';
import {Observable} from 'rxjs'; import {Observable} from 'rxjs';
import {LoginErrorCodes} from './utils/guardHelper.class'; import {LoginErrorCodes} from './utils/guardHelper.class';
@Injectable() @Injectable()
export class FreeGuard implements CanActivate { export class FreeGuard {
constructor(private router: Router) { constructor(private router: Router) {
} }

View File

@ -1,13 +1,13 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { CanDeactivate, Router} from '@angular/router'; import { Router } from '@angular/router';
import {Observable} from 'rxjs'; import {Observable} from 'rxjs';
import {properties} from "../../../../environments/environment"; import {properties} from "../../../../environments/environment";
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) // do not forget to register this class as a provider }) // do not forget to register this class as a provider
export class PreviousRouteRecorder implements CanDeactivate<any> { export class PreviousRouteRecorder {
constructor(private router: Router) { constructor(private router: Router) {
} }
canDeactivate(component: any): Observable<boolean> | boolean { canDeactivate(component: any): Observable<boolean> | boolean {