ngAnimate css animations not working #31

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

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

Show comment
Hide comment
@ajtowf

ajtowf 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.

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

This comment has been minimized.

Show comment
Hide comment
@anthonykeane

anthonykeane May 1, 2014

I have the same issue

I have the same issue

@mcasimir

This comment has been minimized.

Show comment
Hide comment
@mcasimir

mcasimir May 3, 2014

Owner

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

Owner

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

This comment has been minimized.

Show comment
Hide comment
@mcasimir

mcasimir May 11, 2014

Owner

This should be fixed. Isn't it?

Owner

mcasimir commented May 11, 2014

This should be fixed. Isn't it?

@mcasimir mcasimir added the invalid label May 11, 2014

@mcasimir

This comment has been minimized.

Show comment
Hide comment
@mcasimir

mcasimir May 19, 2014

Owner

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;
}
Owner

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

This comment has been minimized.

Show comment
Hide comment
@anthonykeane

anthonykeane 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

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