Skip to content

[4.x] Don't allow injecting classes without @Injectable  #13820

Closed

Description

@vicb
  • Injectable or any sub classes,
  • Should be deprecated in 4.x, remove in the next major release,
  • As of now it is possible when the ctor has no arguments or if any other decorator is applied.

Activity

  1. added
    area: coreIssues related to the framework runtime
    open for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).
    on Jan 7, 2017
  2. trotyl commented on Jan 17, 2017

    @trotyl
    Contributor

    I have a question of why making useClass so different?

    Would @Injectable() also be mandatory for useFactory when decorator for function expression implementation being ready?
    If so, is it a good way to use the same decorator reference to supporting two different decorator types?
    If not, why everything using useFactory/useValue... is injectable by default while what in useClass needs explicitly declared to be injectable?

  3. Toxicable commented on Apr 8, 2017

    @Toxicable

    Was this not fixed via b23ad39 ?

  4. chuckjaz commented on Apr 13, 2017

    @chuckjaz
    Contributor

    Closed by #14931

  5. angular-automatic-lock-bot commented on Sep 11, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  6. locked and limited conversation to collaborators on Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues related to the framework runtimeopen for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions