Filters for convert text to camel case in Angular Js


By using filters convert text to camel case.

.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:

Time Sorting Ascending or Descending Order in Javascript

19-07-2017 Javascript ascending order descending order

Change datepicker display format

06-03-2017 datepicker angular js

Filter for insert HTML in Angular Js

06-03-2017 filter show html angular js html

How to change background color and color to the text using javascript

27-02-2017 css javascript colors

Get random strings from given string In javascript

21-02-2017 javascript random string