AngularJS : change directive scope from transclude -
How can I change the directional variable (which is in the director controller) from another controller, which is in another ?
If you want to change the variable across the controller, then you use the $ root scope instead of the dollar scope. Have to do. For example:
ABC is your variable.
Use this as:
$ rootScope.abc = 1; (DirectX controller) // and change the value in the other controller $ rootScope.abc = 2; (Another controller)
Comments
Post a Comment