Skip to content

[REQ][typescript-angular] Angular 9 providedIn support #6432

Closed
@UnleashSpirit

Description

@UnleashSpirit

Hello,
Angular 9 brings new level for @Injectable, 'any' and 'platform'

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like

Removing the 'providedInRoot' option as boolean and gives a new one.
Something like 'providedIn' with all the choices :

  • none
  • root
  • any
  • platform

May be with keeping default as root ?
And may be a ApiModule.forPlatform() ? (don't even know if it makes sense)

Additional context

I face that 'issue', which is not a real one for now more an improvement, during Angular Elements creation (WebComponent).
In my case I have a service provided un 'platform' level which also depend on generated service from openapi v3. But a 'platform' service can't use a root level service (null injector)

In any case I think that supporting the new levels of Angular 9 Injectable would be appreciate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions