refactor(@nguniversal/common): remove usage of BrowserTransferStateModule

This is no longer needed
This commit is contained in:
Alan Agius 2023-04-11 12:40:49 +00:00 committed by Alan Agius
parent 8d728c4505
commit e0ed653516
2 changed files with 1 additions and 3 deletions

View File

@ -7,7 +7,7 @@ side.
When the module is installed in the application `NgModule`, it will intercept `HttpClient` requests When the module is installed in the application `NgModule`, it will intercept `HttpClient` requests
on the server and store the response in the `TransferState` key-value store. This is transferred to the client, which then uses it to respond to the same `HttpClient` requests on the client. on the server and store the response in the `TransferState` key-value store. This is transferred to the client, which then uses it to respond to the same `HttpClient` requests on the client.
Any requests other than GET will prevent any further requests. You may alternatively use `BrowserTransferStateModule` to write your own behaviour for caching information. Any requests other than GET will prevent any further requests.
### Usage ### Usage

View File

@ -8,7 +8,6 @@
import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { BrowserTransferStateModule } from '@angular/platform-browser';
import { TransferHttpCacheInterceptor } from './transfer-http-cache.interceptor'; import { TransferHttpCacheInterceptor } from './transfer-http-cache.interceptor';
/** /**
@ -16,7 +15,6 @@ import { TransferHttpCacheInterceptor } from './transfer-http-cache.interceptor'
* @experimental * @experimental
*/ */
@NgModule({ @NgModule({
imports: [BrowserTransferStateModule],
providers: [ providers: [
TransferHttpCacheInterceptor, TransferHttpCacheInterceptor,
{ provide: HTTP_INTERCEPTORS, useExisting: TransferHttpCacheInterceptor, multi: true }, { provide: HTTP_INTERCEPTORS, useExisting: TransferHttpCacheInterceptor, multi: true },