File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 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
121121 available in SSR because ` document ` object is not available. To overcome this, navigate to ` server.ts ` file in your
122122 SSR
123123 project, and replace the following code
124-
124+
125125 ``` typescript
126126 server .get (' *' , (req , res ) => {
127127 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
131131with this
132132
133133``` typescript
134+ import { REQUEST as SSR_REQUEST } from " ngx-cookie-service-ssr" ;
135+
134136server .get (' *' , (req , res ) => {
135137 res .render (indexHtml , {
136138 req ,
137139 providers: [
138140 { provide: APP_BASE_HREF , useValue: req .baseUrl },
139- { provide: ' REQUEST ' , useValue: req },
141+ { provide: SSR_REQUEST , useValue: req },
140142 { provide: ' RESPONSE' , useValue: res },
141143 ],
142144 });
You can’t perform that action at this time.
0 commit comments