ng-latinize
v1.0.7
Published
Angularjs directive and angularjs filter; which use latinize.js to convert accents (diacritics) from strings to latin characters.
Downloads
1
Readme
Ng Latinize
Angularjs directive and angularjs filter; which use latinize.js to convert accents (diacritics) from strings to latin characters.
Installation
npm install ng-latinize
bower install ng-latinize
Features
- Using as directive and filter.
- Delete inappropriate characters
- Capitalization option.
Usage
- Add latinize.js and ng-latinize.js to your source.
<script src="bower_components/latinize/latinize.js"></script>
<script src="bower_components/ng-latinize/dist/ng-latinize.js"></script>
Basic Setup
- Add ng-latinize directive to your input element.
<input type="text" ng-model="test" ng-latinize />
- Add ngLatinize filter anywhere you need.
{{ text | ngLatinize }}
Capitalize Setup
- Add capitalize param to your input or variable
<input type="text" ng-model="test" data-capitalize="true" ng-latinize />
{{ anothertext | ngLatinize:true }}
Example
If you enter ỆᶍǍᶆṔƚÉ áéíóúýčďěňřšťžů to the input below.
<input type="text" ng-model="accentedLetter" />
{{ accentedLetter | ngLatinize:true }}
It will convert the string to EXAMPLE AEIOUYCDENRSTZU.
License
MIT license.