angularjs - custom DropDownList how to set default value checked

this is my html code. it's a custom DropDownList that I made. Can someone advise how I could set one of the options to be checked by default in this case below?

 
  {{option.TypeName}}  
 

Asked: February 25, 2016 by saima01
Tags: html , angular js
Posted Under: programming
1,823 Views

1 Answers

Based on the limited details provided in the questions, I'll suggest the following:

<div>
    <div>
      &nbsp; <input type="checkbox"> {{option.TypeName}}
    </div>
</div>
The ngInit directive will select the first element in the selected flags list, by setting the first index of the array to true

Answered: February 25, 2016 by administrator

Post Answer