javascript - AngularJs - ng-disabled -
i have following 2 input fields. difference ng-disabled directive.
so, there repetition of code.i looking forward use 1 input tag fulfilling both purposes.
how can combine these 2 inputs showing/hiding ng-disabled directive based on condition?
<input type="radio" name="student_role" ng-model="student.roleid" /> <input type="radio" name="role" ng-disabled="loggedstudent == student.student.email" ng-model="student.roleid" />
just try
<input type="radio" name="role" ng-disabled="(loggedstudent == student.student.email) ? true : false" ng-model="student.roleid" />
Comments
Post a Comment