Intial
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
window.app.directive('inventoryDetails', inventoryDetails);
|
||||
function inventoryDetails() {
|
||||
return {
|
||||
scope: {
|
||||
inventory: '='
|
||||
},
|
||||
templateUrl: '/inventory/template/inventoryDetails.tmpl.cshtml',
|
||||
controller: controller,
|
||||
controllerAs: 'vm'
|
||||
}
|
||||
}
|
||||
|
||||
controller.$inject = ['$scope', '$uibModal'];
|
||||
function controller($scope, $uibModal) {
|
||||
var vm = this;
|
||||
|
||||
vm.inventory = $scope.inventory;
|
||||
vm.edit = edit;
|
||||
vm.inventory = $scope.inventory;
|
||||
|
||||
function edit() {
|
||||
$uibModal.open({
|
||||
template: '<editInventory inventory="inventory" />',
|
||||
scope: angular.extend($scope.$new(true), { inventory: vm.inventory })
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user