Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 42d09f1

Browse files
docs(NgModelController): clarify the value parameter for $isEmpty
1 parent 8692f87 commit 42d09f1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ng/directive/input.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1814,17 +1814,18 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$
18141814
* @name ngModel.NgModelController#$isEmpty
18151815
*
18161816
* @description
1817-
* This is called when we need to determine if the value of the input is empty.
1817+
* This is called when we need to determine if the value of an input is empty.
18181818
*
18191819
* For instance, the required directive does this to work out if the input has data or not.
1820+
*
18201821
* The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.
18211822
*
18221823
* You can override this for input directives whose concept of being empty is different to the
18231824
* default. The `checkboxInputType` directive does this because in its case a value of `false`
18241825
* implies empty.
18251826
*
1826-
* @param {*} value Reference to check.
1827-
* @returns {boolean} True if `value` is empty.
1827+
* @param {*} value The value of the input to check for emptiness.
1828+
* @returns {boolean} True if `value` is "empty".
18281829
*/
18291830
this.$isEmpty = function(value) {
18301831
return isUndefined(value) || value === '' || value === null || value !== value;

0 commit comments

Comments
 (0)