angular/angular.js — pull request #4153 by petebacondarwin (2013-09-25 12:22:43+00:00)
Title: fix(input): `false` is no longer an empty value by default

This builds upon and improves @lgalfaso's PR https://github.com/angular/angular.js/pull/3658, without resorting to hard-coding fixes across directives.

`checkboxInputType` and `ngList` directives need to have special logic for whether
they are empty or not. Previously this had been hard coded into their
own directives or the `ngRequired` directive. This made it difficult to handle
these special cases.

This change factors out the question of whether an input is empty into a method
`$isEmpty` on the `ngModelController`. The `ngRequired` directive now uses this
method when testing for validity and directives, such as `checkbox` or `ngList`
can override it to apply logic specific to their needs.

Closes #3490, #3658, #2594