>  Q&A  >  본문

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일 전498

모든 응답(3)나는 대답할 것이다

  • PHP中文网

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

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

    회신하다
    0
  • 仅有的幸福

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

    Angular를 사용한 해킹: ngOptions 지시문을 사용하면 도움이 될 수 있습니다.

    회신하다
    0
  • PHP中文网

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

    가장 간단하고 효과적인 방법은 컨트롤러에서 et.edate에 기본값

    을 할당하는 것입니다🎜

    회신하다
    0
  • 취소회신하다