This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.filter('capitalize', function() { | |
return function(input, scope) { | |
if (input!=null) | |
input = input.toLowerCase(); | |
return input.substring(0,1).toUpperCase()+input.substring(1); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Directive for autoNumeric.js | |
// Require AngularJS, jQuery and autoNumeric.js | |
angular.module('crunch.ui.numeric', []).directive('crNumeric', [function () { | |
'use strict'; | |
// Declare a empty options object | |
var options = {}; | |
return { | |
// Require ng-model in the element attribute for watching changes. | |
require: '?ngModel', | |
// This directive only works when used in element's attribute (e.g: cr-numeric) |