-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
I am having a weird problem where the element doesn't get compiled in time for $animate to properly add the animation classes. I have a directive within the template. If I move the $animate.enter line after $compile, then everything works as intended. I have been unable to reproduce the problem in isolation. Any ideas?
function attach (html, locals) {
element = angular.element(html);
if (element.length === 0) {
throw new Error('The template contains no elements; you need to wrap text nodes')
}
// original $animate
scope = $rootScope.$new();
if (locals) {
for (var prop in locals) {
scope[prop] = locals[prop];
}
}
var ctrl = $controller(controller, { $scope: scope });
if (controllerAs) {
scope[controllerAs] = ctrl;
}
$compile(element)(scope);
$animate.enter(element, container); // new $animate
}Metadata
Metadata
Assignees
Labels
No labels