Added filter for sentencecase

This commit is contained in:
2017-03-18 08:42:42 +05:30
parent 5fa6de18c4
commit 875e71b12d
3 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
var app = angular.module("chart-builder",["ngDrag"]);
var app = angular.module("chart-builder",["ngDrag","chart-builder.filters"]);
app.value("allData",{
"values":{
+10
View File
@@ -0,0 +1,10 @@
var app = angular.module("chart-builder.filters",[]);
app.filter("sentencecase", function () {
return function (strToUse) {
if (typeof(strToUse) === "string"){
strToUse = strToUse[0].toUpperCase() + strToUse.slice(1);
}
return strToUse;
};
});