angularjs - NG Options select based on object name -
angularjs - NG Options select based on object name -
i have ng-options, using array of objects objects name property label.
when first load module, ng-module contains object foreign array shares same properties. how ng-options recognise , select right option?
so :
var options = [{name:'test'},{name:'test2'}];
they go ng-options
ng-options="options.name alternative in options "
and model set in controller
$scope.modelvar = {name:'test'};
angularjs
Comments
Post a Comment