Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ factory('btfModal', function ($animate, $compile, $rootScope, $controller, $q, $
controllerAs = config.controllerAs,
container = angular.element(config.container || document.body),
element = null,
container = angular.element(document.body),
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you're changing this logic, you should remove the other container = angular.element(config.container || document.body),

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, forgot that:(

html,
scope;

Expand Down Expand Up @@ -48,6 +49,9 @@ factory('btfModal', function ($animate, $compile, $rootScope, $controller, $q, $
if (element.length === 0) {
throw new Error('The template contains no elements; you need to wrap text nodes')
}
if (config.container) {
container = angular.element(config.container);
}
$animate.enter(element, container);
scope = $rootScope.$new();
if (locals) {
Expand Down