(function() { var app; app = angular.module("ngModal", []); app.provider("ngModalDefaults", function() { return { options: { closeButtonHtml: "X" }, $get: function() { return this.options; }, set: function(keyOrHash, value) { var k, v, _results; if (typeof keyOrHash === 'object') { _results = []; for (k in keyOrHash) { v = keyOrHash[k]; _results.push(this.options[k] = v); } return _results; } else { return this.options[keyOrHash] = value; } } }; }); app.directive('modalDialog', [ 'ngModalDefaults', '$sce', function(ngModalDefaults, $sce) { return { restrict: 'E', scope: { show: '=', dialogTitle: '@', onClose: '&?' }, replace: true, transclude: true, link: function(scope, element, attrs) { var setupCloseButton, setupStyle; setupCloseButton = function() { return scope.closeButtonHtml = $sce.trustAsHtml(ngModalDefaults.closeButtonHtml); }; setupStyle = function() { scope.dialogStyle = {}; if (attrs.width) { scope.dialogStyle['width'] = attrs.width; } if (attrs.height) { return scope.dialogStyle['height'] = attrs.height; } }; scope.hideModal = function() { return scope.show = false; }; scope.$watch('show', function(newVal, oldVal) { if ((!newVal && oldVal) && (scope.onClose != null)) { return scope.onClose(); } }); setupCloseButton(); return setupStyle(); }, template: "