Upgrading to Angular 12 and NgBootstrap 10

This commit is contained in:
softsimon
2021-09-22 15:07:25 +04:00
parent e4e338b05a
commit bbee2dcb5b
9 changed files with 9120 additions and 6613 deletions

View File

@@ -17,7 +17,7 @@ export class HttpCacheInterceptor implements HttpInterceptor {
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
if (this.isBrowser && request.method === 'GET') {
const cachedResponse = this.transferState.get(makeStateKey(request.url), null);
const cachedResponse = this.transferState.get<any>(makeStateKey(request.url), null);
if (cachedResponse) {
const modifiedResponse = new HttpResponse<any>({
headers: cachedResponse.headers,
@@ -35,7 +35,7 @@ export class HttpCacheInterceptor implements HttpInterceptor {
.pipe(tap((event: HttpEvent<any>) => {
if (!this.isBrowser && event instanceof HttpResponse) {
let keyId = request.url.split('/').slice(3).join('/');
this.transferState.set(makeStateKey('/' + keyId), event);
this.transferState.set<any>(makeStateKey('/' + keyId), event);
}
}));
}