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

Commit f231dda

Browse files
docs(input[number]): clarify that model must be of type number
The docs also now link through to the error doc, which contains a runnable example of how to work around this restriction. Closes #11157 Closes #11334
1 parent 03f858e commit f231dda

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ng/directive/input.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,11 @@ var inputType = {
587587
* Text input with number validation and transformation. Sets the `number` validation
588588
* error if not a valid number.
589589
*
590-
* The model must always be a number, otherwise Angular will throw an error.
590+
* <div class="alert alert-warning">
591+
* The model must always be of type `number` otherwise Angular will throw an error.
592+
* Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt}
593+
* error docs for more information and an example of how to convert your model if necessary.
594+
* </div>
591595
*
592596
* @param {string} ngModel Assignable angular expression to data-bind to.
593597
* @param {string=} name Property name of the form under which the control is published.

0 commit comments

Comments
 (0)