TutorialLesson 14Free preview
AngularJS Select
This lesson is part of AngularJS · All levels
Summary
Select elements in AngularJS can be filled with ng-repeat on <option> or using special directives ng-options. ng-options are more flexible because they support labels and values of different object properties. The user's chosen value is always tied to the model through the ng-model.
Key points
- Ng-model accommodates the option value on select
- Ng-repeat can fill <option> simply
- Ng-options are suitable for object data with separate labels and values
- The initial value can be determined by initiating the model
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.