angular.js - AngularJs ng-option how to remove the default item
PHPz
PHPz 2017-05-15 17:03:40
0
3
540
<select ng-model="et.edate" ng-options="et.edate as et.edate for et in endTimeArr" ng-change="getET(et.edate)" class="ng-pristine ng-untouched ng-valid">

<option value="?" selected="selected"></option>

<option value="string:2016-07-07 21:00" label="2016-07-07 21:00">2016-07-021:00</option>            

<option value="string:2016-07-07 21:30" label="2016-07-07 21:30">2016-07-07 21:30</option>

</select>

Excuse me<option value="?" selected="selected"></option> How did this come out and how to remove it?

PHPz
PHPz

学习是最好的投资!

reply all(3)
Ty80

http://jsfiddle.net/MTfRD/3/

仅有的幸福

Hacking with Angular: Playing with the ngOptions directive can help you.

洪涛

The simplest and most effective is: assign a default valueet.edate to

in the controller
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template