Answer the question
In order to leave comments, you need to log in
How does Angular.JS work with select?
Good evening. I was wondering how Angular.JS works with select. For example, I have an
HTML list like this (fragment):
...
<select ng-model="form.currency" ng-options="c as c.label for c in currencies"></select>
{form | json}
...
$scope.currencies = [
{label : 'Доллары', value : 'usd'} ,
{label : 'Евро' , value : 'eur'}
];
select.find('option').eq(1).prop('selected' , true);
Answer the question
In order to leave comments, you need to log in
Now there is no way to check, but perhaps after such a change it is necessary to doangular.element(select).scope().$apply();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question