mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 02:54:21 +08:00
refactor(@nguniversal/common): remove usage of BrowserTransferStateModule
This is no longer needed
This commit is contained in:
parent
8d728c4505
commit
e0ed653516
@ -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
|
||||||
|
|
||||||
|
@ -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 },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user