Setting a Default Value for Select Elements in AngularJS Image Setting a Default Value for Select Elements in AngularJS

This is just a quick code snippet for those of you facing this slight problem when developing your applications using AngularJS 1.5. This works for those of you

<select ng-model="selection" ng-init="selection ='The First Default Option'">
  <option>The First Default Option</option>
  <option>The Second non-default option</option>
</select>
Elliot Forbes

Elliot Forbes
Twitter: @Elliot_f

Hey, I'm Elliot and I've been working on TutorialEdge for the last 4 years! If you have any tips or suggestions as to how I can make it better, please let me know in the comments section!

become a patron Buy Me A Coffee