Skip to content

Commit

Permalink
fix(ui-grid-util.js): Replace angular.uppercase and .lowercase with S…
Browse files Browse the repository at this point in the history
…tring.toUpperCase and .toLowerC

This will allow us to support angular 1.7 when it becomes available.

fix #6715
  • Loading branch information
Portugal, Marcelo authored and mportuga committed May 11, 2018
1 parent 85ad462 commit a41677a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/core/services/ui-grid-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,11 @@ module.service('gridUtil', ['$log', '$window', '$document', '$http', '$templateC
return columnName.replace(/_+/g, ' ')
// Replace a completely all-capsed word with a first-letter-capitalized version
.replace(/^[A-Z]+$/, function (match) {
return angular.lowercase(angular.uppercase(match.charAt(0)) + match.slice(1));
return match.toLowerCase();
})
// Capitalize the first letter of words
.replace(/([\w\u00C0-\u017F]+)/g, function (match) {
return angular.uppercase(match.charAt(0)) + match.slice(1);
return match.charAt(0).toUpperCase() + match.slice(1);
})
// Put a space in between words that have partial capilizations (i.e. 'firstName' becomes 'First Name')
// .replace(/([A-Z]|[A-Z]\w+)([A-Z])/g, "$1 $2");
Expand Down

0 comments on commit a41677a

Please sign in to comment.