Giter VIP home page Giter VIP logo

Comments (4)

JeanMeche avatar JeanMeche commented on May 28, 2024

Hi !
I think this can be linked to #23279 : Async providers.

from angular.

bjornharvold avatar bjornharvold commented on May 28, 2024

Hi @JeanMeche

I believe it can yes 👍🏻. Close issue as you see fit please.

from angular.

pkozlowski-opensource avatar pkozlowski-opensource commented on May 28, 2024

I don't think it is linked to #23279 / async providers. It is more about creating a dedicated EnvironementInjector for the defer block. Currently there is no such capability but in most cases providing a service in root and injecting it into a component would do the trick.

There are some NgRx specific that I don't have enough understanding of. @brandonroberts is there a way of exposing NgRx stores in root?

from angular.

brandonroberts avatar brandonroberts commented on May 28, 2024

Yea, I don't think this is tied to async providers also. The NgRx Store is already provided at the root.

The ask was to be able to register NgRx providers at the component level, which is not possible currently because there is no equivalent ENVIRONMENT_INITIALIZER at the node injector level, and environment providers are incompatible at the component level by design. The either are registered within the bootstrapApplication providers or route-level providers.

I've seen workarounds of people wrapping the store feature state providers in an NgModule/standalone injector and dynamically registering it using the component's injector as its parent, but its not ideal.

from angular.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.