File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export interface KeyValue {
99export interface ICookieService {
1010 readonly valueChange : Observable < KeyValue >
1111 readonly valueChanges : Observable < StringDict >
12+ readonly targetValueChange : ( key : string ) => Observable < KeyValue >
1213 readonly getAll : ( ) => any
1314 readonly get : ( name : string ) => any
1415 readonly set : ( name : string , value : any , options ?: CookieAttributes ) => void
Original file line number Diff line number Diff line change 11import { empty } from 'rxjs'
22import { REQUEST } from '@nguniversal/express-engine/tokens'
33import { Inject , Injectable } from '@angular/core'
4- import { CookieAttributes } from 'js-cookie'
54import { ICookieService } from './common'
65import * as express from 'express'
76
@@ -14,6 +13,10 @@ export class ServerCookieService implements ICookieService {
1413
1514 constructor ( @Inject ( REQUEST ) private req : express . Request ) { }
1615
16+ targetValueChange ( ) {
17+ return empty ( )
18+ }
19+
1720 public get ( name : string ) : any {
1821 try {
1922 return JSON . parse ( this . req . cookies [ name ] )
@@ -26,11 +29,11 @@ export class ServerCookieService implements ICookieService {
2629 return this . req && this . req . cookies
2730 }
2831
29- public set ( name : string , value : any , opts ?: CookieAttributes ) : void {
32+ public set ( ) : void {
3033 // noop
3134 }
3235
33- public remove ( name : string , opts ?: CookieAttributes ) : void {
36+ public remove ( ) : void {
3437 // noop
3538 }
3639
You can’t perform that action at this time.
0 commit comments