mirror of
https://github.com/bendtherules/chart-builder-demo.git
synced 2026-08-18 13:42:05 +00:00
Added filter for sentencecase
This commit is contained in:
@@ -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":{
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user