function isNumeric(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
myApp.controller('DoubleController', ['$scope', function ($scope) {
$scope.double = function (value) {
return (angular.isNumber(value)) ? value * 2 : null;
};
}]);