Linked Questions
17 questions linked to/from Initializing select with AngularJS and ng-repeat
30
votes
6
answers
64k
views
How to make a preselection for a select list generated by AngularJS?
<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 ...
35
votes
1
answer
49k
views
Binding ng-show to a select option in AngularJS
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.
...
8
votes
2
answers
11k
views
angularjs select without ng-options or static options
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='...
0
votes
2
answers
8k
views
AngularJS Select preselect not working
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
...
2
votes
5
answers
3k
views
Preselect <option> in <select> while using ng-repeat
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 ...
1
vote
1
answer
4k
views
How to add selected attribute to ng-repeated dropdown form?
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: ...
0
votes
2
answers
1k
views
multiple default select with ng-model and ng-repeat
<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', ...
4
votes
1
answer
630
views
IE, ng-repeat for select cutting text or showing {{}}
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 ...
1
vote
1
answer
573
views
Angular keep iteraction object in option with ng-repeat
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 ...
1
vote
2
answers
388
views
Select, with ng-repeat, current value of ng-model doesn't appear
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....
0
votes
2
answers
96
views
How to Cascade the country list passed through angular controller to view part
[
{"name":"Afghanistan"},
{"name":"Albania"},
{"name":"Algeria"},
{"name":"American Samoa"},
{"name":"Andorra"},
{"name":"Angola"},
{"name":"Anguilla"},
{"name":"Antarctica"},
...
1
vote
2
answers
161
views
ng option initial value select
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",...
0
votes
2
answers
197
views
Using ng-select with and <option ng-repeat> ... causing the ng-select to point to undefined
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....
0
votes
1
answer
164
views
Sorting dropddown based on a property of JSON object in Angularjs
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 ...
-3
votes
1
answer
82
views
How to change ng-options to ng-repeat in angularjs?
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", ...