(function () { "use strict"; var streamApp = angular.module('streamApp'); streamApp.directive('messageDirective', ['$timeout', MessageDirective]); function MessageDirective($timeout) { return { restrict: 'E', scope: { message: '=', success: '=', callback: '=', show: '=' }, templateUrl: '/App/Directives/message/messageDirective.html?v=6.0.0c', link: function (scope, element, attrs, tabsCtrl) { scope.$watch('show', function () { if (scope.show) { $timeout(function () { if (scope.callback) scope.callback(); scope.show = false; }, 5000); } }); } }; } }());