0
selected
標記將不起作用,因爲ng-model取決於ng-selected,我如何將One
硬編碼爲我的默認選擇?Angular.js默認選擇不適用於ng-model
<div ng-app="myapp">
<fieldset ng-controller="FirstCtrl">
<select ng-model="selectedPerson">
<option selected value="1">One</option>
<option value="2">Two</option>
</select>
</fieldset>
</div>
這不起作用,已經使用'$ scope.selectedPerson ='1'' –