I'm having an issue with ng-class. I need to add a disabled state class if the role has admin privileges, but I keep getting an error.
Here is the HTML:
<label class="toggle modal-label-box" ng-class="{state-disabled: checkCanModify()}">
<input type="radio" name="radio-toggle" ng-model="role" value="guest">
<i data-swchon-text="ON" data-swchoff-text="OFF"></i>No role
</label>
And the JavaScript:
$scope.checkCanModify = function() {
return ($scope.role == "admin" ? true : false);
};
The error message I'm seeing is:
Syntax Error: Token '-' is at column {2} of the expression [{3}] starting at [{4}].
Any ideas on how I can fix this? Thank you!