SmartIT_Extensions/BMC/smart-it-full/components/system-alert/system-alert-inline-directi...

23 lines
880 B
JavaScript

"use strict";
(function () {
'use strict';
angular.module('bmcSystemAlert')
.directive('systemAlertNotificator', ['systemAlertService', function (systemAlertService) {
return {
restrict: 'AE',
replace: true,
templateUrl: 'components/system-alert/system-alert-inline.html',
scope: {},
link: function (scope) {
scope.systemAlertService = systemAlertService;
scope.$on('$locationChangeSuccess', function () {
systemAlertService.dismissAllAlerts();
});
scope.$watch('systemAlertService.alertStack', function () {
scope.displayAlerts = systemAlertService.alertStack;
}, true);
}
};
}]);
}());