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

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -