Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Controllers on directives should be able inject in parent directives #11267

Closed
heneryville opened this issue Mar 6, 2015 · 1 comment
Closed

Comments

@heneryville
Copy link

Directives that require a parent controller should be able to inject those parents into their own controller.

Currently it is possible to get controllers on parent elements in the link function. It would be nice if $compile made these parent controllers injectable into that directives controller. The current workaround would be to add the controller to the scope in the link function, which the controller can also access.

Expected functionality is in this plunker. Expected behavior is that there is no error and blah is injected into blah2. Actual functionality an error occurs saying blahProvider cannot be found.

http://plnkr.co/edit/QXnplKN0asljpKif1qzm?p=preview

@Narretz
Copy link
Contributor

Narretz commented Mar 8, 2015

Hi, this is a dupe of #5893

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants