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

Commit

Permalink
fix(sidenav): improve API usage for $animate enter/leave
Browse files Browse the repository at this point in the history
Closes #2261.
  • Loading branch information
ThomasBurleson committed Apr 11, 2015
1 parent ffd299d commit 4245bcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/sidenav/sidenav.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ function SidenavDirective($timeout, $animate, $parse, $log, $mdMedia, $mdConstan
disableParentScroll(isOpen);

return promise = $q.all([
$animate[isOpen ? 'enter' : 'leave'](backdrop, parent),
isOpen ? $animate.enter(backdrop, parent) : $animate.leave(backdrop),
$animate[isOpen ? 'removeClass' : 'addClass'](element, 'md-closed').then(function() {
if (scope.isOpen) {
focusEl && focusEl.focus();
Expand Down

0 comments on commit 4245bcf

Please sign in to comment.