In my directive (in the link function), I created a variable for the scope variable as follows:
link: function(scope, element, attrs) { "use strict"; scope.success = false;
And in the area template, an input tag is included, for example:
<input type="checkbox" ng-model="success">
This did not work.
In the end, I changed my scope variable as follows:
link: function(scope, element, attrs) { "use strict"; scope.outcome = { success : false };
And my input tag is as follows:
<input type="checkbox" ng-model="outcome.success">
Now it works as expected. I knew this explanation, but I forgot, maybe someone will fill it out for me. :)
ancajic Apr 6 '14 at 9:53 on 2014-04-06 09:53
source share