angularjs - How create select from object in Angular? -


how easy create select list object js?

object:

0: {userswork: "600", name: "salaria"}, 1: {userswork: "700", name: "bavaria"} 

i need create:

<select>    <option value="600">salaria</option>    <option value="700">bavaria</option> </select> 

i tried using ng-option:

<option ng-show="specializationselect == {{value.usersspecializationidspecialization}}" value="{{value.usersworkspaceiduser}}" ng-repeat="(key, value) in options">{{value.detailtousersname}}</option> 

use ng-options

<select ng-options="person.userswork person.name (objid, person) in persons"></select> 

assuming data array object in $scope.persons (sub out whatever)


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -