true if the select element currently has an empty option element, i.e. an option that signifies that the select is empty / the selection is null.
true if the select element's unknown option is selected. The unknown option is added and automatically selected whenever the select model doesn't match any option.
true if the select element has an empty option and this empty option is currently selected. Returns
false if the select element has no empty option or it is not selected.
This example sets a custom error "unknownValue" on the ngModelController when the select element's unknown option is selected, i.e. when the model is set to a value that is not matched by any option.
By default, the "required" error on the ngModelController is only set on a required select when the empty option is selected. This example adds a custom directive that also sets the error when the unknown option is selected.
© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.