AngularJS

AngularJS Directives

AngularJS Filters and Elements

AngularJS Tutorials

AngularJS ng maxlength Directive

AngularJS ng-maxlength Directive

 

 

The ng-maxlength directive is used to add a restriction to an input field, and to form a validator. It is not the same as the maxlength attribute in HTML. It will not prevent users from typing more than the restricted number of characters, but the form will be invalid if they do so.

 

Syntax:-

 

< input type="text" ng-maxlength="number" >< /input >

 

Further Explanation:-

 

Value Description
number A number representing the maximum number of characters legal for the input field.

Code Explanation

All Tutorials related to AngularJS Directives

All Sections related to AngularJS