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:

Check null values in JavaScript?

04-02-2019 JavaScript null check null value

How to get current date and time (yyyy-mm-dd H:i:s) using javascript

09-03-2017 javascript date time

Remove last two characters from given string

06-03-2017 substring javascript remove

Filter for change Date Time format (MM-dd-yyyy HH:mm) in Angular Js

05-03-2017 mm-dd-yyyy HH:MM date formats angular js

Call a function every second or 5 seconds in javascript

22-02-2017 setinterval function calling