Loading ...

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.

 

Be the first to rate this post

  • Currently 0.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5