diff --git a/src/ngAnimate/animateQueue.js b/src/ngAnimate/animateQueue.js index 0d22adc35c40..c9af6632e647 100644 --- a/src/ngAnimate/animateQueue.js +++ b/src/ngAnimate/animateQueue.js @@ -586,6 +586,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { parentHost = parentElement.data(NG_ANIMATE_PIN_DATA); if (parentHost) { parentElement = parentHost; + rootElementDetected = true; } } } diff --git a/test/ngAnimate/animateSpec.js b/test/ngAnimate/animateSpec.js index 1cb8f197c308..6efa19764aaa 100644 --- a/test/ngAnimate/animateSpec.js +++ b/test/ngAnimate/animateSpec.js @@ -1432,20 +1432,22 @@ describe("animations", function() { jqLite($document[0].body).append(innerParent); innerParent.append($rootElement); - var element = jqLite('
'); - jqLite($document[0].body).append(element); + var pinElement = jqLite('