javascript - get select value angularjs without ng-repeat -
<select ng-model="list"> <option value="1">first</option> <option value="2">next</option> </select>
how selected option using angularjs? of case see use ng-repeat how selected option when didn't use ng-repeat?
i console.log($scope.list)
got undefined.
here example angular documentation: plunker
it shows how done.
<select ng-model="model.id" convert-to-number> <option value="0">zero</option> <option value="1">one</option> <option value="2">two</option> </select>
link updated!
Comments
Post a Comment