How to inherit controllers of angular components? In the "old" angular I could use $controller or $injector but what shall I do with isolated scopes?
1 Answer
You can use $parent, $$childHead, $$childTail.
Though isolated scope don't inherit prototypically, they do have parent/child references
5 Comments
Amio.io
Thx for the answer, Kobi. Can you please post me a reference to the docs? I can't find any of the provided
$s here docs.angularjs.org/api .Kobi Cohen
please refer to this semi-official valuable resource github.com/angular/angular.js/wiki/Understanding-Scopes
Amio.io
It looks good. During the week I will finish a component and I let you know if it solved my issue. Then I'd of course accept your answer.
Kobi Cohen
sure enough, hope it would help
RobYed
Please note that $$something is meant to be used by angular internally only. It is considered bad style to use it in your app. Nonetheless I am also searching for a solution for component controller inheritance.