-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Sidenav causes an exception in angular-animate #2261
Comments
@oliverzy - Great catch.
The mdSideNav code is simply wrong. |
This may not be altogether germane, but it looks like some of the other changes to |
@phyllisstein - The Online Docs SideNav uses the |
@ThomasBurleson Right you are! Couldn't reproduce it; must be something funky in my application. Sorry for the bother! |
@ThomasBurleson On second thought, I was able to reproduce it here, in Safari and Chrome: http://plnkr.co/edit/jzI6LmIWGwFPBzjJ17y3?p=preview. The issue seems to occur only when I bootstrap the application manually, with |
Interesting... |
@matsko - any idea why this $animate issue is occurring with a bootstrap process ? |
@matsko - Here is a revised CodePen SideNav with Material and Angular.js 1.4.x that manifests this: The interesting issue if you are not bootstrapping is the at the above error still occurs YET the SideNav animation still works. But if you <script type="text/javascript">
angular.element(document).ready(function() {
angular.bootstrap(document, ['sidenav']);
});
</script> Then the slidein animation no longer works. |
@ThomasBurleson I'm not seeing the error in the provided plunkr. Did you intend to use another link? |
@matsko - I do not see the type error now |
If you do: angular.bootstrap(document.body, ['sidenav']);
angular.bootstrap(document.querySelector('html'), ['sidenav']); Then it works. Perhaps using |
Closing this issue. |
@ThomasBurleson this is a legitimate issue. I've created an issue and a pull request to fix it: angular/angular.js#11574 and angular/angular.js#11575 |
@matsko - thx for the super fast turnaround! |
This has now been merged and fixed in master for 1.4. angular/angular.js@bee14ed |
@matsko - awesome. thx for the follow-up. |
Today I updated to Angular 1.4 RC0, I found an exception is thrown in this line:
https://github.com/angular/material/blame/master/src/components/sidenav/sidenav.js#L292
After looking at the document, $animate.enter and $animate.leave has different signature, I changed the line to
isOpen ? $animate.enter(backdrop, parent) : $animate.leave(backdrop),
, the problem solved.The text was updated successfully, but these errors were encountered: