2015-04-01 85 views

回答

0

你必須有一個NG-模型綁定到複選框或單選按鈕。例如:

<td><input type="radio" name="attachedPlansGroup" ng-model="scope.attachedPlans" ng-value="plans" /></td> 

我把我的ng模型放到我的$ scope中並稱它爲scope。 AttachedPlans屬於上述範圍內的財產。然後,我可以隨時評估scope.attachedPlans,看它是真是假。布爾值指示是否選擇了該單選按鈕。如果你想看到單選按鈕的列表,它更像如下:

       <tr ng-if="!mch.meshedObjectFlag && mch.meshedObjectTrustFlag" 
          ng-repeat="plans1 in mch.meshedObjectTrust | orderBy:orderByField1:reverseSort1 | filter: mch.planfilter1"> 
          <td><input type="radio" name="attachedPlans" ng-model="mch.attachedPlans" ng-value="plans1" /></td> 
          <td>{{plans1.UnderwritingPlanCode}}</td> 
          <td>{{plans1.HOSP_CAL_YR_MAX_BENFT | currency}}</td> 
          <td align="left"> {{plans1.PREEX_DEFINITION}} {{plans1.PREEX_NO_BENFT_PERD}}</td> 
          <td align="left"> 
           {{plans1.EMERGENCY_ROOM_BENFT || 0.00}} 
           {{plans1.OUTPATIENT_SURGERY_BENFT|| 0.00}} 
           {{plans1.DIAGNOSTIC_TEST_BENFT|| 0.00}} 
          </td> 

         </tr> 
相關問題