(function () { "use strict"; var streamApp = angular.module('streamApp'); streamApp.directive('processingDirective', [ProcessingDirective]); function ProcessingDirective() { return { restrict: 'E', scope: { messages: '=', show: '=' }, templateUrl: '/App/Directives/processingDirective/processingDirective.html?v=6.0.0c', link: function (scope, element, attrs, tabsCtrl) { scope.$watch('show', function () { if (scope.show && scope.show.length) { window.onbeforeunload = function () { return true; }; } else { window.onbeforeunload = null; } }); } }; } }());