diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js index 1162af9e486c..2c72166027b8 100644 --- a/src/ng/directive/select.js +++ b/src/ng/directive/select.js @@ -107,7 +107,22 @@ var SelectController = * * @description * HTML `SELECT` element with angular data-binding. - * + * + * The `select` directive provides support for {@link ngModel.NgModelController NgModelController} to + * read and write the selected value(s) of the '` element. This element will then represent the `null` or "not selected" * option. See example below for demonstration. + * + * ### Example use of select with default value set + * + +
+
+ + +
+ + Required! +
+
+
+ option = {{data.selectedOption}}
+ myForm.mySelect.$valid = {{myForm.mySelect.$valid}}
+ myForm.mySelect.$error = {{myForm.mySelect.$error}}
+ myForm.$valid = {{myForm.$valid}}
+ myForm.$error.required = {{!!myForm.$error.required}}
+
+ * * *
* The value of a `select` directive used without `ngOptions` is always a string.