diff --git a/index.html b/index.html index 1b45e36..e9e381c 100644 --- a/index.html +++ b/index.html @@ -53,7 +53,7 @@
- +
@@ -65,6 +65,7 @@ + \ No newline at end of file diff --git a/js/app.js b/js/app.js index ccd1700..6ed84e0 100644 --- a/js/app.js +++ b/js/app.js @@ -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":{ diff --git a/js/filters.js b/js/filters.js new file mode 100644 index 0000000..82b3916 --- /dev/null +++ b/js/filters.js @@ -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; + }; +}); \ No newline at end of file