Filters for convert text to camel case in Angular Js

angularjs
camelcase
filters

By using filters convert text to camel case.

angular.module('test')
.filter('TextCamelCase', function() {
  return function(input) {
    input = input || '';
    return input.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
  };
});

 

You might also like:

How to search text in string using php ?

29-10-2017 php search string search

Use java script file client side and server side at a time in node js

30-07-2017 node js include call javascript

How to use http-post request in node js

14-03-2017 http-post module node js

How to find Angular Errors

06-03-2017 errors angularjs exceptionHandler

Filter for change Date format (MM-dd-yyyy) in Angular Js

05-03-2017 mm-dd-yyyy date formats angular js