I am building an application with angularJS, we have to give max length validation in it.
so we should use ng-maxlength or html maxlength attribute ?
what difference will it make?
Thanks.
I am building an application with angularJS, we have to give max length validation in it.
so we should use ng-maxlength or html maxlength attribute ?
what difference will it make?
Thanks.
maxlength.ng-maxlength. If a user inputs more than ng-maxlength attribute
value then ng-invalid-maxlength class will be set to the field.The difference is that the standard approach(html) doesn't allow entering more than max, while Angular's(angular JS) approach just generates a validation error.