Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
fix(autocomplete): adds support for the new $animate.pin() in `ng-a…
Browse files Browse the repository at this point in the history
…nimate@1.4.0-rc.1`
  • Loading branch information
Robert Messerle committed Apr 24, 2015
1 parent 973a2fc commit 790ccca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/autocomplete/js/autocompleteController.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var ITEM_HEIGHT = 41,
MAX_HEIGHT = 5.5 * ITEM_HEIGHT,
MENU_PADDING = 8;

function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $mdTheming, $window, $rootElement) {
function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $mdTheming, $window, $animate, $rootElement) {

//-- private variables

Expand Down Expand Up @@ -104,6 +104,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
$mdTheming(elements.$.ul);
elements.$.ul.detach();
elements.$.root.append(elements.$.ul);
if ($animate.pin) $animate.pin(elements.$.ul, $rootElement);
}

function focusElement () {
Expand Down

1 comment on commit 790ccca

@matsko
Copy link
Contributor

@matsko matsko commented on 790ccca Apr 27, 2015

Choose a reason for hiding this comment

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

@robertmesserle this code looks correct. The ngAnmate spec tests look the same (https://github.com/angular/angular.js/blob/master/test/ngAnimate/animateSpec.js#L1163).

Could you send me more info on slack as to what is failing with it? Where is the animation code that calls animations on elements.$.ul?

Please sign in to comment.