Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 如何在列表框中添加按钮并执行一些操作_Angularjs_Asp.net Mvc 4 - Fatal编程技术网

Angularjs 如何在列表框中添加按钮并执行一些操作

Angularjs 如何在列表框中添加按钮并执行一些操作,angularjs,asp.net-mvc-4,Angularjs,Asp.net Mvc 4,我正在使用angualrjs处理listbox <select size="10" id="myselection" ng-model="currentItems" ng-options="s.id as s.text for s in roles" ng-change="getCategory(currentItems)"></select> 但我不知道如何在列表框中添加按钮,并在单击“添加”按钮后执行一些操作。我建议您使用一些组件库,例如Angular UI/

我正在使用angualrjs处理listbox

 <select size="10" id="myselection" ng-model="currentItems" ng-options="s.id as s.text for  s in roles"  ng-change="getCategory(currentItems)"></select>

但我不知道如何在列表框中添加按钮,并在单击“添加”按钮后执行一些操作。

我建议您使用一些组件库,例如Angular UI/Bootstrap,它提供了很好的引导组件包

下拉列表可能是您想要使用的


它看起来像是包含普通链接的select,您可以在其中使用ng click。

为什么需要内置按钮?您不能。但是您可以处理更改并单击事件来执行一些操作是的..但是我们可以使用指令来实现?但是我不知道如何使用指令..: