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

OnIdentifyEffects does not work with Angular 10 #2639

Closed
aram-m opened this issue Jul 30, 2020 · 2 comments
Closed

OnIdentifyEffects does not work with Angular 10 #2639

aram-m opened this issue Jul 30, 2020 · 2 comments

Comments

@aram-m
Copy link

aram-m commented Jul 30, 2020

I'm getting No suitable injection token for parameter 'effectIdentifier' of class 'SomethingEffects'.
just try to add this doc example in some effect

class EffectWithIdentifier implements OnIdentifyEffects {
 constructor(private effectIdentifier: string) {}

 ngrxOnIdentifyEffects() {
   return this.effectIdentifier;
 }

Versions of NgRx, Angular, Node, affected browser(s) and operating system(s):

"@angular/animations": "~10.0.2", "@angular/cdk": "^10.0.1", "@angular/common": "~10.0.2", "@angular/compiler": "~10.0.2", "@angular/core": "~10.0.2", "@angular/fire": "^6.0.0", "@angular/forms": "~10.0.2", "@angular/material": "^10.0.1", "@angular/material-moment-adapter": "^10.0.1", "@angular/platform-browser": "~10.0.2", "@angular/platform-browser-dynamic": "~10.0.2", "@angular/router": "~10.0.2", "@ngrx/effects": "^9.1.2", "@ngrx/entity": "^9.1.2", "@ngrx/router-store": "^9.1.2", "@ngrx/schematics": "^9.1.2", "@ngrx/store": "^9.1.2", "@ngrx/store-devtools": "^9.1.2",

Thanks for NGRX <3

@timdeschryver
Copy link
Member

Did this work on previous versions of Angular?
The problem is that you will have to provide something for effectIdentifier. The example in the docs came from the need of creating and registering the effect manually (and not via forRoot or forFeature), see #1443 for more context.

@aram-m
Copy link
Author

aram-m commented Jul 30, 2020

@timdeschryver my bad closing the issue, thanks!!

@aram-m aram-m closed this as completed Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants