SmartIT_Extensions/BMC/smart-it-full-helix/scripts/app/common/related-item-directive.js

24 lines
714 B
JavaScript

"use strict";
(function () {
'use strict';
angular.module('myitsmApp')
.directive('relatedItem', ['configurationModel',
function (configurationModel) {
return {
restrict: 'E',
replace: true,
templateUrl: 'views/common/related-item.html',
scope: {
item: '=',
removeAllowed: '=',
showDetails: '&',
removeItem: '&'
},
link: function (scope) {
scope.isAppEnabled = configurationModel.isServerApplicationEnabled(scope.item.type);
}
};
}
]);
})();