表单不适用于select?

时间:2015-12-17 19:26:31

标签: html angularjs

表单不接受select。当我评论select部分时,一切正常。我在哪里弄错了?

 <form ng-submit="submitForm()">
     <select ng-model="selectedMedication" style="display: block" 
 ng-options="medication.name for medication in data2" ng-model = "newPrescription.medication_name">
     </select>          
 <input type="date" class="datepicker" ng-model = "newPrescription.start_date">
   <label for="datepicker">Start date</label>
</form>

1 个答案:

答案 0 :(得分:2)

您在选择...

上有2 ng-model指令