KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I expect the following code to render a drop down list with the third option selected by default. However, when I bind the select with angularjs, the default selection disappears. Any thought? var myApp = angular.module('myApp', []); ... <div> <select id="myselection" ng-model="selectedColors"> <option value="1" >Red</option> <option value="2">Blue</option> <option value="3" selected="selected">Green</option> </select> <div> Selected Colors: {{selectedColors }} </div> </div> Here's a working example: http://jsfiddle.net/TXPJZ/134/ Thanks!
Tags (comma-separated)
Save Edits
Cancel