Setting a Default Value for Select Elements in AngularJS Image

Setting a Default Value for Select Elements in AngularJS

Table Of Contents

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

1
2
3
4
<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>
Was This Post Helpful?
Submit a PR: Edit on Github