Heim  >  Fragen und Antworten  >  Hauptteil

angular.js - AngularJs ng-option 如何去掉默认项

<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>

请问<option value="?" selected="selected"></option> 这个是怎么出来的 如何去掉呢?

PHPzPHPz2713 Tage vor500

Antworte allen(3)Ich werde antworten

  • PHP中文网

    PHP中文网2017-05-15 17:05:40

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

    Antwort
    0
  • 仅有的幸福

    仅有的幸福2017-05-15 17:05:40

    Hacking with Angular: 玩转ngOptions指令可以帮到你。

    Antwort
    0
  • PHP中文网

    PHP中文网2017-05-15 17:05:40

    最简单有效的是:在controller中给et.edate指定默认值

    Antwort
    0
  • StornierenAntwort