【发布时间】:2014-07-01 10:21:00
【问题描述】:
我正在使用 ui-select2,如文档中所示:
<select ui-select2="{ allowClear: true}" ng-model="select2">
<option value="one">First</option>
<option value="two">Second</option>
<option value="three">Third</option>
</select>
我想在像 select2-open, select2-opening or select2-close 这样的事件上调用控制器上的一些函数:
$scope.myFunction = function(){
alert("Hello");
}
我该怎么做?
【问题讨论】:
-
您找到了如何观看触发事件的答案吗?我对“select2-open”特别感兴趣。我也发现了这个问题,但没有帮助我解决我的问题stackoverflow.com/questions/18968376/…
-
你试过 angular-ui-select 吗?这是一个纯粹的角端口。
-
我前段时间遇到过这个问题,但我还没有尝试过。如果您尝试过,您认为它回答了我的问题吗?
-
@Sulthan 问题是,angular-ui-select 仍在大力开发中,它缺少许多功能。查看路线图github.com/angular-ui/ui-select/wiki/Roadmap,看看您是否满足您的要求并且不需要完全实现的 select2 端口。
标签: angularjs jquery-select2 ui-select2 angularjs-select2