@@ -456,7 +456,7 @@ export class AppComponent implements OnInit {
456
456
// Note: all the "special" headers in NgHttpCachingHeaders are removed before send the request to the backend.
457
457
this .http .get (' https://my-json-server.typicode.com/typicode/demo/db' , {
458
458
headers: {
459
- [NgHttpCachingHeaders .DISALLOW_CACHE ]: ' 1' ,
459
+ [NgHttpCachingHeaders .DISALLOW_CACHE ]: ' 1' ,
460
460
}
461
461
}).subscribe (e => console .log );
462
462
}
@@ -486,7 +486,7 @@ export class AppComponent implements OnInit {
486
486
// Note: all the "special" headers in NgHttpCachingHeaders are removed before send the request to the backend.
487
487
this .http .get (' https://my-json-server.typicode.com/typicode/demo/db' , {
488
488
headers: {
489
- [NgHttpCachingHeaders .LIFETIME ]: (1000 * 60 * 60 * 24 * 365 ).toString (),
489
+ [NgHttpCachingHeaders .LIFETIME ]: (1000 * 60 * 60 * 24 * 365 ).toString (),
490
490
}
491
491
}).subscribe (e => console .log );
492
492
}
@@ -516,7 +516,7 @@ export class AppComponent implements OnInit {
516
516
// Note: all the "special" headers in NgHttpCachingHeaders are removed before send the request to the backend.
517
517
this .http .get (' https://my-json-server.typicode.com/typicode/demo/db' , {
518
518
headers: {
519
- [NgHttpCachingHeaders .ALLOW_CACHE ]: ' 1' ,
519
+ [NgHttpCachingHeaders .ALLOW_CACHE ]: ' 1' ,
520
520
}
521
521
}).subscribe (e => console .log );
522
522
}
@@ -620,15 +620,15 @@ export class AppComponent {
620
620
// using NgHttpCachingService.clearCacheByTag("foo") for delete all the tagged request.
621
621
this .http .get (' https://my-json-server.typicode.com/typicode/demo/db?id=1' , {
622
622
headers: {
623
- [NgHttpCachingHeaders .TAG ]: ' foo' ,
623
+ [NgHttpCachingHeaders .TAG ]: ' foo' ,
624
624
}
625
625
}).subscribe (e => console .log );
626
626
627
627
// This request is also tagged with "foo" keyword, and has another tag "baz".
628
628
// You can add multiple tags comma separated.
629
629
this .http .get (' https://my-json-server.typicode.com/typicode/demo/db?id=2' , {
630
630
headers: {
631
- [NgHttpCachingHeaders .TAG ]: ' foo,baz' ,
631
+ [NgHttpCachingHeaders .TAG ]: ' foo,baz' ,
632
632
}
633
633
}).subscribe (e => console .log );
634
634
}
0 commit comments