Skip to content
Open
Changes from all commits
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
5 changes: 4 additions & 1 deletion modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ factory('btfModal', function ($animate, $compile, $rootScope, $controller, $q, $
var template = config.template,
controller = config.controller || angular.noop,
controllerAs = config.controllerAs,
container = angular.element(config.container || document.body),
element = null,
container = angular.element(document.body),
Copy link
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
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 +48,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