Angularjs Examples

AJS Examples


AngularJS Input Type Number

The AngularJS input types are HTML input element control and used togather with ng-model directive. AngularJS input type Number can be decorate with various AngularJS arguments like name, ng-required,ng-minlength,ng-maxlength,ng-pattern and ng-change.

Syntax

AngularJS Input Type Number Arguments

Here is a list of AngularJS Input Type Number Arguments.

DirectivesDescription
ng-modelAngularJS expression to bind the number.
name (optional)Name of the control input control.
ng-minlength (optional)AngularJS expression sets the min validation constraint to the number.
ng-maxlength (optional)AngularJS expression sets the max validation constraint to the number.
ng-pattern (optional)Validate input type number with given match pattern.
required (optional)Validate input type number is required.
ng-required (optional)AngularJS expression ng-required expression evaluates to true.
ng-change (optional)AngularJS expression to be executed when input value changes.

AngularJS Input Type Number Example

Above example will produce following output



See Live Example