I am new to Angular.js and I am trying to make a custom directive(which has a controller with functions in it) that is linked to a controller. When an object in the controller($scope.MyObj), changes I would like to have a similar object in my directive controller that changes the same way. In addition is it possible to invoke a function/scope method that is declared in my directive controller, from my basic controller(or invoke a function from my directive controller when an object from the basic controller has changed.) ?
Join the Stack Overflow Community
Stack Overflow is a community of 6.7 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up
Join them; it only takes a minute:
Aviv Ben-Yosef writes a pretty nice post about it on http://www.codelord.net where he basically hooks into the controller from a isolated directive scope: |
|||
|
if you are using Angular 1.4 and above you can use
|
|||
|