zackbrown / famous-angular-ui-router

Simple demo of using ui-router with Famo.us/Angular
12 stars 7 forks source link

faAnimate with named nested `uiView` #6

Open joaoneto opened 9 years ago

joaoneto commented 9 years ago

Is it possible to use faAnimate with named nested uiView?

Like this: http://plnkr.co/edit/x7ITiRzusL6pDKsdMTRi?p=preview

In my case, I have an abstract state, which has a view called app, this state also modify other two internal views that compose it: header and content. And the children states also modify these views.

ui-view "app" abstract
     |
     ` --- ui-view "header"
     ` --- ui-view "content"
     |
 child state1
     |
     ` --- ui-view "header"
     ` --- ui-view "content"
joaoneto commented 9 years ago

Plunkr updated, works!

But I added css class to delay the ui-view transitions, is this a wrong way to do this?

[ui-view].ng-enter, [ui-view].ng-leave,
ui-view.ng-enter, ui-view.ng-leave {
  -webkit-transition:all .450s ease-in-out;
  -moz-transition:all .450s ease-in-out;
  -o-transition:all .450s ease-in-out;
  transition:all .450s ease-in-out;
}