Upgrading to Angular 12 and NgBootstrap 10

This commit is contained in:
softsimon committed 2021-09-22 23:57:05 +04:00
1 parent f96126d40b
commit 8be71577cc
9 files changed
+9120 -6613

No files matched your search

@@ -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);
}
}));
}