Linked Questions

30 votes
6 answers
64k views

<select ng-model="team.captain" ng-options="player.name for player in team.players"></select> This correctly creates a select list to choose the team captain. However, by default a blank ...
randomguy's user avatar
  • 12.3k
35 votes
1 answer
49k views

It's fairly straightforward. You can easily give show/hide functionality to pretty much any element using ng-show="myModelName". In the official documentation they achieve this using a checkbox. ...
Scott Sword's user avatar
  • 4,718
8 votes
2 answers
11k views

How, to use a static select in angularjs. I wanna create a select ng-model with change event with statc values. <form ng-controller="mycontroller"> <select class="form-control" name='...
Adilson Santos da Rocha's user avatar
0 votes
2 answers
8k views

Preselection is not working in the select field even though the objects are equal: <select ng-show="isEditMode(todo.id)" id="assignee" name="assignee" ng-model="todo.assignee" required ...
Daniel's user avatar
  • 906
2 votes
5 answers
3k views

I am using AngularJS and HTML. Is there a way to pre-select an option in an option tag if my options are being generated using an ng-repeat? See below code snippet for example: HTML: <select ...
eclaire211's user avatar
1 vote
1 answer
4k views

I have a form that builds out multiple widgets based on some JSON data. In part of that form is a select dropdown, and some items have different options selected by default. ie: object 1 { tag: ...
Leon Gaban's user avatar
  • 39.4k
0 votes
2 answers
1k views

<script src="" https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js ""></script> <script> var app = angular.module('role', []); app.controller('fooController', ...
banu prakash's user avatar
4 votes
1 answer
630 views

Basic Problem I have a multi-select (list) that depending on how I write the html/angular has a bug. In the first case the last 3 characters are cut off from the rendering. In the second case the ...
Μenelaοs's user avatar
  • 24.4k
1 vote
1 answer
573 views

With ng-options the selectedCar will be a car object <select ng-model="selectedCar" ng-options="car as car.description for car in cars track by car.id"> </select> With ng-repeat ...
thiagoaos's user avatar
1 vote
2 answers
388 views

I have this code above: <select ng-model = "vm.modulo.nomenclatura" class="form-control" required> <option></option> <option ng-value="modulo.key" ng-repeat="modulo in vm....
Pedro Fernandes's user avatar
0 votes
2 answers
96 views

[ {"name":"Afghanistan"}, {"name":"Albania"}, {"name":"Algeria"}, {"name":"American Samoa"}, {"name":"Andorra"}, {"name":"Angola"}, {"name":"Anguilla"}, {"name":"Antarctica"}, ...
Vishnu S Babu's user avatar
1 vote
2 answers
161 views

I have a dynamic combo box. I want to initialise the value of all combo boxes like this the image below is from adding static values like this $scope.newObject ={ 0 : "N/P" ,1 : "N/P",2 : "N/P",...
Kamel Mili's user avatar
  • 1,464
0 votes
2 answers
197 views

I am using ng-select to put the default option as the first option (past). However it shows the default as "undefined". <select ng-model="yearSem" ng-show="integrated" ng-change="enrollCtrl....
Ysrninja's user avatar
  • 199
0 votes
1 answer
164 views

http://jsfiddle.net/aBccw/ <div ng-options="f.name for f in JSONArray | orderBy:'f.name'" ng-model="selected" ></div> This is just dirty representation of actual code, it might contain ...
Rishi Prakash's user avatar
-3 votes
1 answer
82 views

I'm using angular material and can't use ng-options directive for select (because options don't creating inside select tag in angularjs material). I have ng-options="(k.x.y) as k.x.z for k in q", ...
Vlad Udod's user avatar
  • 1,759

15 30 50 per page