You are here


AngularJS using the Select Element

AngularJS makes the rendering of an HTML select element quite simple, especially for dynamic options that can be retrieved via a backend service. The directive that AngularJS uses for select elements defined the ng-required attribute that is available for input elements and an ng-options attribute that can be used to generate option elements from arrays and objects, see Listing 1 below.

<!DOCTYPE html>