Skip to content

mvrana-cen81948/angular-remove-diacritics

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-remove-diacritics

Overview

Angular service to remove accents/diacritics in strings

All the best and enjoy using.

Getting started

Download

Install from bower

bower install angular-remove-diacritics

Load Script

Load the script file: remove-diacritics.js in your application:

<script type="text/javascript" src="remove-diacritics.js"></script>

Code

Add the txx.diacritics module as a dependency to your application module:

var myAppModule = angular.module('MyApp', ['txx.diacritics'])
.controller('myController', function($scope, removeDiacritics) {
		var myValue = 'my +ľščťžťžáí!@#$#$^&*';
		var replaceWith = '-';
		
		// this will return my +lsctztzai!@#$#$^&*
        $scope.replace = function(){
            return removeDiacritics.replace(myValue);
        };

		// this will return my-lsctztzai-
		$scope.createSEOname = function(){
			return removeDiacritics.seo(myValue, replaceWith);
		};

About

Angular service to remove accents/diacritics in strings

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%