diff --git a/modal.js b/modal.js index ae1f50d..29ba4f3 100644 --- a/modal.js +++ b/modal.js @@ -19,7 +19,7 @@ function modalFactoryFactory($animate, $compile, $rootScope, $controller, $q, $h var template = config.template, controller = config.controller || null, controllerAs = config.controllerAs, - container = angular.element(config.container || document.body), + container = config.container || document.body, element = null, html, scope; @@ -65,7 +65,7 @@ function modalFactoryFactory($animate, $compile, $rootScope, $controller, $q, $h } } $compile(element)(scope); - return $animate.enter(element, container); + return $animate.enter(element, angular.element(container)); } function deactivate () { @@ -90,4 +90,4 @@ function modalFactoryFactory($animate, $compile, $rootScope, $controller, $q, $h active: active }; }; -} \ No newline at end of file +}