admin管理员组文章数量:1023044
I have been scouring the web for an answer to this but I cannot seem to find any definitive answers.
The problem seems to be that the ngAnimate directive is not adding the classes ng-enter
or ng-leave
when the route is changing. I have created a test application and included the ngAnimate
directive to the app. I also created the animate class and applied the class to the ng-view
element
The link to my test application is here:
I have been scouring the web for an answer to this but I cannot seem to find any definitive answers.
The problem seems to be that the ngAnimate directive is not adding the classes ng-enter
or ng-leave
when the route is changing. I have created a test application and included the ngAnimate
directive to the app. I also created the animate class and applied the class to the ng-view
element
The link to my test application is here: http://plnkr.co/edit/6qCMeIkWeXeTQyDWcu29?p=preview
Share Improve this question asked Aug 21, 2014 at 17:05 LukePLukeP 1,6051 gold badge19 silver badges26 bronze badges 01 Answer
Reset to default 6Simply add each vendor's prefix for each browser e.g. chrome's -webkit
in your css file
FORKED PLUNKER
.slide.ng-enter, .slide.ng-leave{
position: absolute;
}
.slide.ng-enter {
animation: slideInRight 0.5s both ease-in; z-index: 8888;
-webkit-animation: slideInRight 0.5s both ease-in; z-index: 8888;
}
.slide.ng-leave {
animation: slideOutLeft 0.5s both ease-in; z-index: 9999;
-webkit-animation: slideOutLeft 0.5s both ease-in; z-index: 9999;
}
@keyframes slideOutLeft {
to { transform: translateX(-100%); }
}
@-webkit-keyframes slideOutLeft {
to { transform: translateX(-100%); }
}
@keyframes slideInRight {
from { transform: translateX(100%); }
to { transform: translateX(0); }
}
@-webkit-keyframes slideInRight {
from { transform: translateX(100%); }
to { transform: translateX(0); }
}
I have been scouring the web for an answer to this but I cannot seem to find any definitive answers.
The problem seems to be that the ngAnimate directive is not adding the classes ng-enter
or ng-leave
when the route is changing. I have created a test application and included the ngAnimate
directive to the app. I also created the animate class and applied the class to the ng-view
element
The link to my test application is here:
I have been scouring the web for an answer to this but I cannot seem to find any definitive answers.
The problem seems to be that the ngAnimate directive is not adding the classes ng-enter
or ng-leave
when the route is changing. I have created a test application and included the ngAnimate
directive to the app. I also created the animate class and applied the class to the ng-view
element
The link to my test application is here: http://plnkr.co/edit/6qCMeIkWeXeTQyDWcu29?p=preview
Share Improve this question asked Aug 21, 2014 at 17:05 LukePLukeP 1,6051 gold badge19 silver badges26 bronze badges 01 Answer
Reset to default 6Simply add each vendor's prefix for each browser e.g. chrome's -webkit
in your css file
FORKED PLUNKER
.slide.ng-enter, .slide.ng-leave{
position: absolute;
}
.slide.ng-enter {
animation: slideInRight 0.5s both ease-in; z-index: 8888;
-webkit-animation: slideInRight 0.5s both ease-in; z-index: 8888;
}
.slide.ng-leave {
animation: slideOutLeft 0.5s both ease-in; z-index: 9999;
-webkit-animation: slideOutLeft 0.5s both ease-in; z-index: 9999;
}
@keyframes slideOutLeft {
to { transform: translateX(-100%); }
}
@-webkit-keyframes slideOutLeft {
to { transform: translateX(-100%); }
}
@keyframes slideInRight {
from { transform: translateX(100%); }
to { transform: translateX(0); }
}
@-webkit-keyframes slideInRight {
from { transform: translateX(100%); }
to { transform: translateX(0); }
}
本文标签: javascriptngAnimate not adding ngenter class to ngview in Angular 12Stack Overflow
版权声明:本文标题:javascript - ngAnimate not adding ng-enter class to ng-view in Angular 1.2 - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745579240a2157210.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论