Files
InventoryTraker-Box/InventoryTraker.Web/js/inventory/InventoryDetailsDirective.js
T
2016-08-22 11:03:00 -04:00

28 lines
649 B
JavaScript

(function() {
'use strict';
window.app.directive('inventoryDetails', inventoryDetails);
function inventoryDetails() {
return {
scope: {"inventories" : "="},
templateUrl: '/inventory/template/inventoryDetails.tmpl.cshtml',
controller: controller,
controllerAs: 'vm'
}
}
controller.$inject = ['$scope', '$uibModal'];
function controller($scope, $uibModal) {
var vm = this;
vm.inventories = $scope.inventories;
vm.edit = edit;
function edit() {
$uibModal.open({
template: '<editInventory inventory="inventory" />',
scope: angular.extend($scope.$new(true), { inventory: vm.inventory })
});
}
}
})();