SmartIT_Extensions/BMC/smart-it-full/scripts/app/asset/preview-asset-details-direc...

26 lines
969 B
JavaScript

"use strict";
(function () {
'use strict';
angular.module('assetModule')
.directive('previewAsset', ['googleMapService', function (googleMapService) {
return {
restrict: 'A',
templateUrl: 'views/asset/asset-details.html',
scope: {
displayMenu: '=',
hidePersonInfoCard: '=',
hideRelationships: '=',
isFullVersion: '='
},
controller: 'AssetController',
link: function (scope, element, attr) {
scope.googleMapAvailable = googleMapService.isAvailable;
attr.$observe('previewAsset', function (previewAssetIds) {
var asset = angular.fromJson(previewAssetIds);
scope.init(asset.assetId, asset.assetClassId);
});
}
};
}]);
}());