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 my work has helped you in any way, shape, or form then please consider supporting my work.

become a patron Buy Me A Coffee