File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ Only install `ngx-cookie-service-ssr` library (and skip `ngx-cookie-service`) fo
121
121
available in SSR because ` document ` object is not available. To overcome this, navigate to ` server.ts ` file in your
122
122
SSR
123
123
project, and replace the following code
124
-
124
+
125
125
``` typescript
126
126
server .get (' *' , (req , res ) => {
127
127
res .render (indexHtml , { req , providers: [{ provide: APP_BASE_HREF , useValue: req .baseUrl }] });
@@ -131,12 +131,14 @@ Only install `ngx-cookie-service-ssr` library (and skip `ngx-cookie-service`) fo
131
131
with this
132
132
133
133
``` typescript
134
+ import { REQUEST as SSR_REQUEST } from " ngx-cookie-service-ssr" ;
135
+
134
136
server .get (' *' , (req , res ) => {
135
137
res .render (indexHtml , {
136
138
req ,
137
139
providers: [
138
140
{ provide: APP_BASE_HREF , useValue: req .baseUrl },
139
- { provide: ' REQUEST ' , useValue: req },
141
+ { provide: SSR_REQUEST , useValue: req },
140
142
{ provide: ' RESPONSE' , useValue: res },
141
143
],
142
144
});
You can’t perform that action at this time.
0 commit comments