HTML dropdown with ng-options binding does not work with angular-dart

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 13:09:06

问题


Angular-dart ng-options does not seems to be working.

  <select ng-model="selectedOption" ng-options="s.DisplayText for s in myOptions">
        <option value="">Select Option</option>
    </select>

回答1:


<select ng-model="selectedOptionId">
        <option value="">Select Option</option>
        <option ng-repeat="o in myOptions" value="{{o.id}}">
                    {{o.DisplayText}}
        </option>
</select>

Note that selectedOptionId is string, if we use myOption(type with id and DisplayText as properties) as model it will add new option with "?" in HTML.



来源:https://stackoverflow.com/questions/31349506/html-dropdown-with-ng-options-binding-does-not-work-with-angular-dart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!