I have this i a directive:
if (scope.quesProp.required) {
scope.required = '!someSelected(choices.selectedStuff)';
} else {
scope.required = false;
}
and this in the template:
< some input val....
ng-required= 'required'
..>
I want it to change between false and !someSelected(choices.selectedStuff), it's not working if i do the above, and everything works great if in the template i change it back to this:
ng-required='!someSelected(choices.selectedStuff)'
ng-required="isFieldRequired()"? And let that function return true/false.