Reputation: 933
I am trying to check multiple values in ng-disabled
.
I am trying
ng-disabled = "{{ (id === po.adm_sid) || (sid === po.opm_sid) }}"
which doesn't work. It works when I check a single value. I also tried:
ng-disabled = "{{ id === (po.adm_sid || po.opm_sid) }}"
Upvotes: 1
Views: 722
Reputation: 4041
I would make a helper function and not have multiple checks in the html. Something like:
ng-disabled = "isDisabled()"
$scope.isDisabled = function(){
return (id === po.adm_sid) || (sid === po.opm_sid);
}
I usually have better luck with this kind of set up for multiple value checking in the html
Upvotes: 3