Skip to content

Support for Angular 6.0.x and @nguniversal/express-engine 6.x#8

Open
SergiusSidorov wants to merge 5 commits into
ngx-utils:masterfrom
SergiusSidorov:master
Open

Support for Angular 6.0.x and @nguniversal/express-engine 6.x#8
SergiusSidorov wants to merge 5 commits into
ngx-utils:masterfrom
SergiusSidorov:master

Conversation

@SergiusSidorov

Copy link
Copy Markdown

Angular Express Engine 6 natively provide request and response through injection tokens:
import { REQUEST, RESPONSE } from '@nguniversal/express-engine/tokens';
Previous version on @ngx-utils/cookies uses string constants for injection and need additional code at server.js.

@SergiusSidorov SergiusSidorov mentioned this pull request Aug 24, 2018
@lgoudriaan

Copy link
Copy Markdown

Can this PR get merged?

@aescarcha

Copy link
Copy Markdown

Please merge this, 7.0 is coming soon....

@segux

segux commented Feb 26, 2019

Copy link
Copy Markdown

Merge this one please!

@skyquartam

Copy link
Copy Markdown

To work around this issue, simply put this in your app.server.module.ts

providers: [
    {
      provide: 'REQUEST',
      useValue: REQUEST
    },
    {
      provide: 'RESPONSE',
      useValue: RESPONSE
    }

And rember to add this to your server.ts

app.get("*", (req, res) => {
  res.render("index", { req, res });
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants