No provider for InjectionToken RESPONSE/REQUEST #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I am very happy with this module, however, I think there is an issue in the dependencies of the ServerCookiesService. I am getting an "No provider for InjectionToken RESPONSE" and "No provider for InjectionToken REQUEST" error.
I cloned the repo and changed to dependency injections to:
... import {REQUEST, RESPONSE} from '@nguniversal/express-engine/tokens'; ... export class ServerCookiesService extends CookiesService { ... constructor( cookiesOptions: CookiesOptionsService, @Inject(REQUEST) private request: any, @Inject(RESPONSE) private response: any ) { super(cookiesOptions); }
It seems like the injection using the strings in @Inject('REQUEST') and @Inject('RESPONSE') does not work any longer. I am using Angular 8. Here are the Angular dependencies from the package.json
{ "@angular/animations": "^8.2.14", "@angular/common": "^8.2.14", "@angular/compiler": "^8.2.14", "@angular/core": "^8.2.14", "@angular/forms": "^8.2.14", "@angular/platform-browser": "^8.2.14", "@angular/platform-browser-dynamic": "^8.2.14", "@angular/router": "^8.2.14", "@angular/upgrade": "^8.2.14", "@nguniversal/common": "^8.2.6", "@nguniversal/express-engine": "^8.2.6", "@nguniversal/module-map-ngfactory-loader": "^8.2.6", "angular-in-memory-web-api": "^0.9.0" }
If you think this change might be useful, I could implement it.
thanks