singpath / classmentors

Class Mentors UI
http://www.classmentors.com
MIT License
0 stars 8 forks source link

Remove/update input value attributes #132

Closed dinoboff closed 8 years ago

dinoboff commented 8 years ago
coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 12.177% when pulling a597308153c6954e9ef1cff10239d9c6cf31ade6 on dinoboff:fix-value-attribute into 83696f948b1b0e0f7dae83e5086dc9870d2edac1 on singpath:master.

dinoboff commented 8 years ago

@shiquan-lim I left out:

classmentors/components/events/events-view-eduDisLearn-task-form.html:
   53                                  <tr>
   54                                      <td ng-repeat="family in ctrl.familyMembers track by $index">
   55:                                         <md-checkbox value="{{family.name}}"
   56                                                       ng-click="ctrl.toggle(family, ctrl.selectedFamily)"
   57                                                       ng-checked="ctrl.exists(family, ctrl.selectedFamily)" required>
   ..
   83                                          <md-checkbox ng-click="ctrl.toggle(ethnic, ctrl.selectedRaceEthnicity)"
   84                                                       ng-checked="ctrl.exists(ethnic, ctrl.selectedRaceEthnicity)"
   85:                                                      value="{{ethnic.firstRow}}">
   86                                              {{ethnic.firstRow}}
   87                                          </md-checkbox>
   ..
   92                                          <md-checkbox ng-click="ctrl.toggle(ethnic, ctrl.selectedRaceEthnicity)"
   93                                                       ng-checked="ctrl.exists(ethnic, ctrl.selectedRaceEthnicity)"
   94:                                                      value="{{ethnic.secondRow}}">
   95                                              {{ethnic.secondRow}}
   96                                          </md-checkbox>

I am not sure how to handle it see I am unfamilliar with the eduDisLearn task. One usually use a ngModel to handle a mdCheckbox:

<md-checkbox ng-model="ctrl.value" ng-change="ctrl.save(ctrl.value)">
  enable some value
</md-checkbox>

If for some reason you need to use angular interpolation with a builtin html attribute, use the "ng-attr" prefix, e.g.:

<input ng-attr-value="{{ctrl.value}}"/>