114 questions
0
votes
1
answer
28
views
how to make dropdown select a certain value from getting the id from the database?
The code below show a dropdown list from using ng-repeat. When I edit this entity, I have to make them show a certain value selected already than just showing a whole list. I know that I can put ...
0
votes
1
answer
47
views
want to get label but nothing is shown in the view
Function are over called with expressions in AngularJS
I want to get the label binded to the selectedType value in the option tag but nothing is shown in the view and in the console there are many ...
0
votes
1
answer
3k
views
color of option in Angular select
How do I assign a font colour for each option in the dropdown menu in angular?
I tried to do it by adding
ng-style="{color:{{selectedCar.dropdown_color}};}" to the select tag, but it's not working.
...
0
votes
2
answers
58
views
My ng-option select bar is showing the last value in the list
Here is my HTML
<select ng-if="list[$index].length>0" data-ng-model="form1value[$index]"
data-ng-options="label for label in obj.child track by $index">
</select>
I am getting ...
0
votes
1
answer
302
views
How to load model on the fly angularjs Select combo box
At the moment I have a combo box. In my appservice, I query my database and grab top ten.
<select id="StationSelectionCombobox"
name="Country"
ng-options="s.amenityUID as s....
1
vote
1
answer
69
views
Select doesn´t recognise ng-change
I have a "select" using ng-options. It has 4 "periods". After an event is triggered, this happens:
if ($scope.periods.length <= 4) {
$scope.periods.push({
IdPeriod: 6,
Description: "...
-2
votes
2
answers
425
views
Set filter value as options in select box
In Angularjs app, i am using ng-options to display the user and valid from date.
Here i am having a checkbox which will be checked default means only valid rates needs to be displayed..
Here valid ...
0
votes
1
answer
57
views
Dynamically change dropdown select defaults depending on existing values in array
I am new to web development and AngularJS and I have been struggling with how to go about this. Sorry for the bad English.
I use an ng-repeat that creates the correct number of dropdowns I need as ...
0
votes
1
answer
62
views
How to dynamically set value for Angularjs select?
In Angularjs, I try to set option dynamically from program. But, I am not able to set.
Please support.
Verify comment's reference link for more details.
Thanks in Advance!
<div ng-app="myApp"&...
0
votes
1
answer
1k
views
Is there a way to show previously selected option in a dropdown
I have a <select> element in my html page. The <option>s are given through a loop. The selected value is stored using a ng-model. This data is now push to a database. The next time that ...
0
votes
3
answers
629
views
ng-options orderBy value in key value pairs
I am not able to order a key value pair with respect to value in alphabetical order.
The sample which I am using is,
"week_days_short":[
{"key":"1","value":"Mon"},
{"key":"2","value":"Tue"},...
0
votes
2
answers
1k
views
How to reset ng-model variables to Null in AngularJS?
In AngularJS, I have the following sample code:
<select style="margin-left:5px;width:60px" id="product" ng-model="output.product">
<select style="margin-left:5px;width:60px" id="status" ng-...
0
votes
1
answer
792
views
How to disable the selected option from other select list in angularjs?
I am setting up a select list From Year and To Year through ng-repeat and its working fine what I need is when I select an option from the list it should be disabled from another list. how to do using ...
0
votes
1
answer
34
views
equating variables which are coming from http calls
I have a select tag with options populated by AngularJS. I am trying to select an option if it equals to another property in scope. Option values and scope property I am trying to compare are both ...
-2
votes
1
answer
2k
views
Add font-awesome icon to option in select [duplicate]
Is it possible to add font-awesome icon to<option> in <select>?
<body ng-app>
<i class="fa fa-camera-retro"></i> fa-camera-retro<br>
<select ng-model="...
0
votes
1
answer
76
views
unable to push string to listbox in angularjs
When I'm trying to push a string(New) to a list box it was inserting as "undefined" to it.
$http({
method: 'GET',
url: 'http://xxx/api/Maintenance/GetAllFilteredItems',
...
0
votes
2
answers
277
views
angularjs highlight the first item in select
After the initial call to get the list of items (see below), I need get select the first item and get more details from my database. So after the items load into my select input I need to :
Highlight ...
0
votes
1
answer
573
views
Angularjs listbox control with single selection
I'm just looking for a listbox with single selection so that each item can be selected from the listbox.
But unable make it to single selection using the below code after make it to multiple = false.
...
0
votes
1
answer
66
views
scope undefined for a text box
I'm trying to bind value to a text box as per below code. But unable to do so and getting msg as Scope undefined during debugging and no error msg in developer tools.
Issue in the $scope....
1
vote
1
answer
982
views
Remove filter when user selects default value in select
I have some issue with default angularjs filter feature. When the data load first time the data is loading without any filter applied.That is expected and when I selects from the drop down the filter ...
0
votes
0
answers
46
views
selected="selected" applied for all select options in angularjs
While switching between dropdown values in Angularjs Select directive, only the ng-model value is updated. But in browser console selected class wont be changed. How to change the selected value?
see ...
-1
votes
2
answers
123
views
Angularjs Add strange option into select
Hello I have the same issue
Select Issue
i have strange option like this
<option value="? string:98 ?"></option>
Html Code
<select ng-model="vm.student" class="form-control">...
0
votes
1
answer
680
views
AngularJS retain selection after page refresh
I have an select tag like this
<select ng-model="teamId"
ng-options="team.globalId as team.name for team in teamList"
ng-change="teamOnChange(teamId)">
</select>
On ...
0
votes
0
answers
56
views
Dynamic no of drop down list generate as per value in previous drop down list in AngularJS 1.x
I have the following requirement: I have one drop-down list containing Employee records and which is getting filled on page load (JSON format). In that data list I have one value as Approval Level ...
0
votes
1
answer
236
views
how to make the user input appear in drop down menu in angularjs
I had created a dropdown menu with "other" option that enables the user to write an input then click on an add button to add it to the dropdown list.
my problem is the user input is added to the ...
-1
votes
1
answer
28
views
Select options not settings in AngularJs
I am using Angular Js and trying to add items in dropdownbox. But the items are not appearing in the select box. Below is the code I tried. In index.html
<html xmlns="http://www.w3.org/1999/xhtml" ...
0
votes
1
answer
807
views
How to display sections within a select dropdown using AngularJS? [duplicate]
There is a select dropdown that currently displays a list of values (All Car Makes).
The new requirement is to have sections within the same select dropdown, so that it shows a new set of values (...
1
vote
1
answer
213
views
Unable to set default value for angularjs select when using watch
View
<select ng-options="department.name for department in departmentsList track by department.departmentID"
ng-model="editAllocate.department">
</select>
<select ng-...
0
votes
0
answers
65
views
angular, select with dynamic disabled
Now I am trying to select box with disabled.
When $shop.products.product[i].productId is changed by selectBox, I want that value disabled in select box option.
for example, if i select 3 in select ...
0
votes
0
answers
44
views
Resetting a <select> selection
I'd like to be able to reset the selected <option> in the <select> to the default one (the disabled hidden one).
<select ng-model="question1" ng-options="answer as answer.name for ...
1
vote
1
answer
195
views
How do I filter drop down list and bind first matching item in select drop down list in angular js
I have input text box to filter items from a dropdown Select list.
This works fine.
But there are two problems.
When data gets populated i want 1st item to be visible in dropdown.
As i type in ...
0
votes
1
answer
83
views
Second select box needs to be populated after the first select box is selected
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<link rel="stylesheet" href="https://stackpath....
0
votes
1
answer
125
views
ngOptions non-strict comparison with ngModel
Is there any way to perform a non-strict comparison in the <select> ngOptions in order to set the initial value from a model? For example, if the model is an integer and the options key property ...
1
vote
2
answers
2k
views
Retrieving selected option angularJS with ng-repeat
I'm traying to retrieve the selected option from the HTML view with AngularJS, but I do not find the way since all the solutions I have seen take into account the parameter "value", but I do not have ...
0
votes
0
answers
27
views
ng-selected not working in anagular.js 1.6.6 [duplicate]
After a lot of tries and several hours :-(, I need some help:
I'm doing an update for a object in the database.
I'm doing an update for a object in the database all is working except setting the ...
1
vote
1
answer
151
views
Reset the filter if match not found in select box
I am trying to create a filter which will show the results in the table based on the selection in the select box.
Also, by default the 'City' select box will be set user location which I'm grabbing ...
0
votes
2
answers
2k
views
Blank option with empty string created in select using AngularJS
I've created an angularJS select box which will filter the results in a table based on the selected value in the select box.
Now, the select box is created using an object 'user['location']' which ...
0
votes
1
answer
2k
views
ng-selected not working with ng-options or ng-repeat [duplicate]
I have a form which the user can fill out to get directions to a destination using google maps.
There are 350 possible set destinations that the user can chose from. They can chose this destination by ...
2
votes
1
answer
853
views
Angular ng-options preselect a value using an option datasource
I have an object like so:
$scope.properties = {
1: 'Option A',
2: 'Option B',
3: 'Option C'
};
And an ng-model variable like so:
$scope.selectedValue = 2;
And some markup like so:
<...
1
vote
0
answers
249
views
Angular js oi-select ng-init with ng-repeat
I am working on dynamic forms with ng-repeat. I am using the oi-select library for loading my locations. The oi-select box has multi select feature. on my page loading by default, I am loading first ...
0
votes
2
answers
565
views
ng-repeat with angular form select box
i am working with AngularJS dynamic forms . According to my userid value i generated multiple form field with same model name using ng-repeat. i am using select box for loading location. As per my ...
0
votes
2
answers
3k
views
Default for ng-select not working
I have a form using a select. I'm trying to set a default value, which I want to disable, so the dropdown will show "-- select state --" as the first option and will force the user to make a selection....
1
vote
0
answers
111
views
Angularjs - ng-model not working for select while using ng-repeat and ng-selected
I have set my ng-repeat in options along with ng-selected, but option is not getting selected, When I remove ng-model from select all become working.
HTML code:
<select ng-model="formData.value"&...
3
votes
2
answers
1k
views
:AngularJS: ng-selected is not working with a true statement
I have a a select box like this:
<select class="form-control"
ng-model="contactName"
ng-change="testFun(contactName)"
ng-...
1
vote
3
answers
930
views
How to get a string value on select option instead of object:1 etc
How can I make angular populate value with actual string.
I want to get this
<option label="New York City" value="New York City">New York City</option>
Instead of this
<option label="...
5
votes
3
answers
22k
views
Using <select> and <option> in AngularJS
I have this anchor tag and i change my view depending on the date coming from the object. I am trying to change it to be a select option but it is not working the way i am doing it.
This is anchor ...
0
votes
1
answer
61
views
AngularJS ng-selected [duplicate]
I am using the following code in my website. Everything is working fine but whenever I select a value in the first select, the second select always returns selected value as A, even if I select B in ...
1
vote
0
answers
410
views
Malfunctioning Select option dropdowns while using ngRepeat (or ngOptions), ngModel, ngChange and ngSelected altogether
I have a smart table with a column containing Select options (drop-down) based on one object and it's selected option based on a different JSON object.
So I use ng-repeat to repeat all option values ...
0
votes
1
answer
842
views
Angular JS: Show the Input value as Selected in Dropdown
I am newbie to Angular JS. I did find for the solution, but didn't resolved it.
As per selected value in dropdown, value should be displayed in corresponding Input box.
For Eg: If Basic is selected, ...
0
votes
2
answers
2k
views
How to keep first option selected in oi-select angularjs
Plunker to try I am using oi-select library to select multiple options, I want the first value from data should be selected by default, as soon as the data is available.
html code
<oi-select ...