Skip to content

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