Skip to content

fix(compiler): support interface types in injectable constuctors#14894

Merged
chuckjaz merged 1 commit intoangular:masterfrom
chuckjaz:issue12631
Mar 15, 2017
Merged

fix(compiler): support interface types in injectable constuctors#14894
chuckjaz merged 1 commit intoangular:masterfrom
chuckjaz:issue12631

Conversation

@chuckjaz
Copy link
Contributor

@chuckjaz chuckjaz commented Mar 2, 2017

Fixes #12631

What kind of change does this PR introduce? (check one with "x")

[x] Bugfix

What is the current behavior? (You can also link to an open issue here)

ngc will generate an error when an @Injectable class uses an interface as a parameter with an @Inject parameter.

What is the new behavior?

The type of the parameter is ignored and the instance implied by the token is injected into the class.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a test for when the interface is in a different file than the usage.

@chuckjaz chuckjaz added the action: merge The PR is ready for merge by the caretaker label Mar 8, 2017
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker cla: yes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AoT error with @Inject and interface type

3 participants