在angularJS中下拉 [英] Dropdown in angularJS
问题描述
我是angularJS的新手,我有一个小问题,即关于angularJS下拉
一旦用户从下拉列表中选择一个文本字段我正在存储valuefield ..
但是当我想在gridview中显示所选的文本字段时,它只显示valuefield ..我可以克服它我在谷歌上搜索过但可能是我找不到正确的资源..
任何人都可以提出一些很好的资源来获取所有控制细节如
下拉列表,列表框等..,在angularJS
还有一个问题:angularJS是否满足所有要求开发的需求非SPA申请。
提前谢谢。
Hi,
I am new in angularJS,and i have a small question i.e.,regarding dropdown in angularJS
once the user select a textfield from dropdown i am storing valuefield..
but when i want to display the selected textfield in gridview it is displaying only valuefield..how can i overcome it & i have searched on google but might be i did not find the correct resources..
can anyone suggest some good resource for getting all controls details like
dropdown,listbox etc.., in angularJS
And one more Question:Does angularJS fullfill all requirments for developing a non SPA application.
Thanks in advance.
推荐答案
我想说这是你的解决方案:
https://angular-ui.github.io/bootstrap/ [ ^ ]
I would say this is your solution:
https://angular-ui.github.io/bootstrap/[^]
使用ng-options显示下拉列表
Use ng-options for displaying dropdown
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<div ng-app="test">
<div ng-controller="DemoCtrl">
<select ng-model="selectedRole" ng-options="Role as Role.Name for Role in Roles track by Role.Id" ng-change="GetValue()">
@*ng-options="Role as Role.Name for Role in Roles"*@
@*ng-options="a.Id as a.Name for a in Roles track by a.Id"*@
<option value="">Select Account</option>
</select>
<br />
@*selected Value is : {{selectedRole}}*@
</div>
</div>
<script>
angular.module('test', []).controller('DemoCtrl', function (
这篇关于在angularJS中下拉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!