Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ngAnimate css animations not working #31

Closed
ajtowf opened this issue Apr 24, 2014 · 6 comments
Closed

ngAnimate css animations not working #31

ajtowf opened this issue Apr 24, 2014 · 6 comments
Labels

Comments

@ajtowf
Copy link

@ajtowf ajtowf commented Apr 24, 2014

Adding an animation class to ng-view together with app-content class will cause the page not to render.

Works fine without the animation css class, but not as neat with no animations of course.

How to reproduce:

Downloaded angular, route and animate from https://code.angularjs.org/1.2.9/

html :

<div class="app-body">
<div ng-view class="app-content fadetransistion"></div>
</div>

js :

angular.module("app", [
"ngRoute",
"ngAnimate",
"mobile-angular-ui",
"mobile-angular-ui.touch",
"mobile-angular-ui.scrollable"]);

css :

.fadetransistion {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 100%;
opacity: 1;
}
.fadetransistion.ng-enter,
.fadetransistion.ng-leave {
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;
}
.fadetransistion.ng-enter {
opacity: 0;
}
.fadetransistion.ng-enter-active {
opacity: 1;
}
.fadetransistion.ng-leave {
opacity: 1;
}
.fadetransistion.ng-leave-active {
opacity: 0;
}

@ajtowf
Copy link
Author

@ajtowf ajtowf commented Apr 24, 2014

Removed all dependencies to mobile angular ui and the animation works fine, so the bug is definitely in the mobile ui lib.

@anthonykeane
Copy link

@anthonykeane anthonykeane commented May 1, 2014

I have the same issue

@mcasimir
Copy link
Owner

@mcasimir mcasimir commented May 3, 2014

I'll never used ngAnimate, I've always used css directly. It is related to some clashes between animation style and .app-content style. I'm concerned expecially by position:absolute;

Setting width: 100%; in .app-content should turn your content back.

Let me know if I'm right so I can add this fix to sources, otherwise I'll give it a more accurate look after I'll fixed [scrollable] related issues.

Thank you

@mcasimir
Copy link
Owner

@mcasimir mcasimir commented May 11, 2014

This should be fixed. Isn't it?

@mcasimir mcasimir added the invalid label May 11, 2014
@mcasimir
Copy link
Owner

@mcasimir mcasimir commented May 19, 2014

Ok I can confirm this is fixed. Plus you can reduce your code to:

.app-content.ng-enter,
.app-content.ng-leave {
  -webkit-transition:0.5s ease all;
  transition:0.5s ease all;
}

.app-content.ng-enter,
.app-content.ng-leave.ng-leave-active {
  opacity:0;
}
.app-content.ng-leave,
.app-content.ng-enter.ng-enter-active {
  opacity:1;
}
@mcasimir mcasimir closed this May 19, 2014
@anthonykeane
Copy link

@anthonykeane anthonykeane commented May 21, 2014

It could be my lack of angular but I cannot get the tabs to fade in and a search filters the list instantly, sorry I know this is closed but any help would be appreciated.

https://gist.github.com/anthonykeane/407fbef71b02c8f56f0d#file-c-css

https://gist.github.com/anthonykeane/3c5e39e972f240a21dff#file-criteria-html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.