This angular-tolowercase is an Angular.js directive that lowercases all of its input so you don't have to.
Simply add the attribute to-lower-case
on your input. The usage of ng-model
is required.
See the demo here.
This project depends on Angular 1.x.
Install using Bower:
bower install angular-tolowercase
You can also install it manually by copying the to-lower-case.js
file into your project.
Add the directive as a dependency to your app:
angular.module('myApp', ['td.tolowercase'])
Use on any input element like so—don't forget that you must use ng-model
for this directive to work:
<input type="email" ng-model="emailAddress" to-lower-case />