Skip to content
🐫 AngularJS filter to convert strings to lower camel case replacing non-alphanumeric characters.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.editorconfig
.gitignore
.jshintrc
.npmignore
LICENSE
README.md
bower.json
camelize.js
camelize.min.js
index.js
karma.conf.js
package.json

README.md

angular-camelize-filter

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

Installation

You can install the filter using Bower:

$ bower install angular-camelize-filter

Or npm:

$ npm install angular-camelize-filter

Then you have to include it in your HTML:

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

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

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

Usage

You can use it like any other AngularJS filter:

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

Example

var camelized = $filter('camelize')('angular-camelize-filter');
console.log(camelized); // angularCamelizeFilter

Related

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

License

MIT © Pablo Villoslada Puigcerber

You can’t perform that action at this time.