Files
InventoryTracker/InventoryTraker.Web/js/report/NewCustomersReportDirective.js
T
2016-08-08 14:47:35 -04:00

27 lines
537 B
JavaScript

(function() {
'use strict';
window.app.directive('newCustomersReport', newCustomersReport);
function newCustomersReport() {
return {
scope: true,
templateUrl: '/js/app/report/templates/newCustomersReport.tmpl.html',
controller: controller,
controllerAs: 'vm'
}
}
controller.$inject = ['$http'];
function controller($http) {
var vm = this;
vm.isLoading = true;
$http.post('/Report/NewCustomers')
.success(function (customers) {
vm.customers = customers;
vm.isLoading = false;
});
}
})();