<a href="#" ng-repeat="item in home.prData" ng-click="home.selectedPr = item; $event.preventDefault();
$event.stopPropagation();">{{item.date}}</a>
我正在尝试将其更改为当我使用选择选项时像那样。
<select st-search="{{item.date}}" class="show-tick form-control dropdown_custom_list">
<option value="">- select a date -</option>
<option ng-repeat="item in home.prData" value="{{home.selectedPr = item}}">{{item.date}}
</option>
</select>
我创建了一个示例 plunkr,展示了我想要实现的内容:
(注意:保留了 HTML 标签)
ngRepeat生成select选项。 - georgeawg