question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: Add forRoot & forFeature

See original GitHub issue

I.e. ngrx has forRoot & forFeature https://stackoverflow.com/questions/46348412/what-is-the-difference-between-storemodule-forroot-and-storemodule-forfeature

For FirebaseUI-Angular by having .forRoot that initialises in the AppModule, we could also have an instance of .forFeature that is being used for lazy loaded feature modules. So this would be possible to also use <firebase-ui></firebase-ui> in other lazy loaded modules.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
RaphaelJennicommented, Jun 17, 2018

So I finally had some time to check this issue. The plugin works this way anyway. You initialize the module in the main module with forRoot, in every other (lazy loaded) module you import it without the forRoot.

You can read more about that in here: https://medium.com/@chrishouse/when-to-use-angulars-forroot-method-400094a0ebb7

The forFeature is only ngrx to import some further sub stores. This isn’t needed here.

1reaction
RaphaelJennicommented, Jun 7, 2018

I will look into it as soon as I find the time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to register ngrx sub features (StoreModule.forFeature ...
So the requirement is to have store for subfeatures. Like this: app.module.ts -- StoreModule.forRoot() mainboard.module.
Read more >
Understanding the magic behind StoreModule of NgRx ...
In this article we're going to dive deep into the internals of @ngrx/store package. We'll examine how state, reducers, store and actions work...
Read more >
Going from forRoot() to forFeature() - O'Reilly
Going from forRoot() to forFeature() To solve the mess we are creating in app.module.ts, we will now use a method called forFeature() on...
Read more >
ngRx/Store and 5 silly mistakes - ITNEXT
In this article, I will tell you how to avoid simple pitfalls while working with ngRx to improve your family-work balance:-) If you...
Read more >
NestJS - A progressive Node.js web framework - Facebook
Ive seen nestjs package, where you have to use forRoot, forFeature methods in order to import them. ... adds additional config related to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found