Question:
I would like to modify the parameter for ng-disabled
via a directive on the same element so that
<my-custom-input ng-disabled = "ctrl.condition" my-global-disabled-condition>
</my-custom-input>
generates the same effect as
<my-custom-input ng-disabled = "ctrl.condition || someService.isWinterComing()">
</my-custom-input>
How can I use a directive to modify the parameters for ng-disable
, ng-if
and other directives? Manually adding the logic to each element would work of course but that would not be properly modularized code.
Update
I was using an isolated scope by accident which caused my compile-step to produce unexpected results.
Thus my question is a duplicate of