-
Notifications
You must be signed in to change notification settings - Fork 33
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
example of how to use with ngrx
v4 and effects
?
#18
Comments
ngrx
v4 and effects
?
@pjmagee I think I understood what you meant. It seems like I would recommend to change the order of imports (at the app.module.ts, in NgModule section for instance) and see those values are still undefined or not. Also try to update this post after you make some tries, and meanwhile I'll see what can I do for this. |
@pjmagee I chosen one of my projects as a victim and upgraded the ngrx to Well, Is it possible for you to post the repro steps (github, plunkr, etc) so that I can try to have a look. Well, it might be a commercial project, or could take much time to elaborate even a smaller version. I'll try to integrate ngrx |
I always ensure the Essentially my problem is, I have a I'm not sure how this ngrxOnRunEffects solve my problem, because my Security service is already injected into the Effect at that point. I can try to defer calling the config service GetSettings function and see how it plays out. No matter what I try, it just appears that ConfigService never has the keys/values set in time, even once the page has rendered. So yeah, not sure how I can do this. class Effects {
constructor(securityService: SecurityService) { }
}
class SecurityService {
constructor(configService: ConfigService) { }
// configService getSettings() undefined v4.0
// configService getSettings() defined perfectly pre v4.0 using RunAfterBootstrap
}
@NgModule({ imports [
ConfigModule.forRoot({ // produces my ConfigService from Http to be injected into any Service
provide: ConfigLoader,
useFactory: (createConfigLoader),
deps: [Http, [ORIGIN_URL]]
}),
...,
EffectsModule.forRoot(EFFECTS) // new ngrx v4.0 (config settings always undefined)
// Effects.RunAfterBootstrap(Effects) // pre ngrx v4.0 (config settings worked fine)
]})
class AppModule {
} |
@pjmagee you can have a look at ng-seed/universal, commit 6a50aac which closes fulls1z3/universal#70. |
ngrx
v4 and effects
?ngrx
v4 and effects
?
I'm submitting a ... (check one with "x")
[ ] bug report => check the README and search github for a similar issue or PR before submitting
[X] support request => check the README and search github for a similar issue or PR before submitting
[] feature request
I'm currently using ngrx and have migrated to v4 which is inline with Angular4 versioning (they want to make this the standard way of developing angular4 apps with the ngrx platform). Previously I was able to get my configuration bootstrapped prior to the ngrx effects being loaded immediatley but now in the ngrx v4 the effects seem to be loaded instantly and I'm not sure how I can now bootstrap my configuration. Because my ngrx effects are being injected with the config service and now the values are undefined because they are instantiated because the config is bootstrapped. This is quite a major breaking change from the ngrx side, however nobody has responded and I'm kind of looking at this repo with your knowledge to see if maybe you might have some working examples with applications that will use the ngrx platform.
The text was updated successfully, but these errors were encountered: