Click here to Skip to main content
15,347,000 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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 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.
Updated 19-Mar-21 2:51am
Anil Vaghasiya 8-Jul-15 2:45am

Can You give brief description with sample code for getting more details and which kind of issue is occur in your case.

I would say this is your solution:[^]
Use ng-options for displaying dropdown
<script src=""></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>
        <br />
        @*selected Value is : {{selectedRole}}*@
    angular.module('test', []).controller('DemoCtrl', function ($scope, $http, $window) {
        $scope.selectedRole = null;
        $scope.Roles = [];
        $scope.GetValue = function () {
            var RoleId = $scope.selectedRole.Id;
            var RoleName = $scope.selectedRole.Name;
            console.log(RoleId, RoleName);
            method: 'GET',
            url: '/Account/GetRoles',
            //data: { applicationId: 3 }
        }).success(function (result) {
            $scope.Roles = result;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900