AngularJS ng-options

Hello everybody,

today I want to make some post about how to work with AngularJS select directive from viewpoint of complicated objects. 

<select id="type"

              class="form-control" name="type" aria-readonly="true"

               ng-model="course.courseId">

                 <option ng-selected="{{ course.courseId== et.id }}"

                   ng-repeat="et in courseTypes" value="{{et.id}}">{{et.name}}

                 </option>

</select>

In controller I have some code which populates data from controller for course types, and in order to display complicated parts I applied mentioned before select.

No Comments

Add a Comment