Skip to content

🔡 AngularJS filter to convert strings to lower case replacing non-alphanumeric characters.

License

Notifications You must be signed in to change notification settings

Puigcerber/angular-lowerize-filter

Repository files navigation

angular-lowerize-filter

AngularJS filter to convert strings to lower case replacing non-alphanumeric characters.

Intended to be used with Firebase for creating named ID keys that can be indexed and queried.

Installation

You can install the filter using Bower:

$ bower install angular-lowerize-filter

Or npm:

$ npm install angular-lowerize-filter

Then you have to include it in your HTML:

<script src="bower_components/angular-lowerize-filter/lowerize.js"></script>
<script src="node_modules/angular-lowerize-filter/lowerize.js"></script>

And inject the module puigcerber.lowerize as a dependency of your application:

angular.module('webApp', ['puigcerber.lowerize']);

Usage

You can use it like any other AngularJS filter:

<p>{{ input | lowerize }}</p>

Example

var lowerized = $filter('lowerize')('angular-lowerize-filter');
console.log(lowerized); // angularlowerizefilter

Related

  • camelize: AngularJS filter to convert strings to lower camel case replacing non-alphanumeric characters.
  • capitalize: AngularJS filter to capitalize sentences and specially team names.

License

MIT © Pablo Villoslada Puigcerber

About

🔡 AngularJS filter to convert strings to lower case replacing non-alphanumeric characters.

Resources

License

Stars

Watchers

Forks

Packages

No packages published