Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SergiusSidorov
Copy link

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

Can this PR get merged?

@aescarcha
Copy link

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

@segux
Copy link

segux commented Feb 26, 2019

Merge this one please!

@skyquartam
Copy link

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