Reputation: 2850
How to access child directives scope from parent controller?
I can get the parents scope from the child directive but can't do it the other way round.
ideas?
Upvotes: 0
Views: 1563
Reputation: 645
If you are using an isolated scope, an option would be to bind some object using "=", for example:
scope: {
foo: "="
}
Then in html:
<my-directive foo="fooInController">
Then you can use the variable fooInController and it will bind automatically to directive's foo.
Upvotes: 2