How can I use ng-animate with ui-view rather than ng-view?

后端 未结 8 1749
自闭症患者
自闭症患者 2020-12-13 00:26

I am using angular-ui-router with angularJS v1.2 and would like to implement custom page transitions.
How can I use ng-animate with ui-view (from angular-ui-router) rath

8条回答
  •  不思量自难忘°
    2020-12-13 00:50

    Like someone said in the post. there is a angular 1.2 branch of the router that has patches that make it work. I know for a fact that using Angular 1.2.6 ng-animate 1.2.6 and my special ui-router build of 0.2.0 beta branch 1.2 works... fading ui-views.. in and out.

    the problem is that you need to "build" the beta branch angular router.. you can't just go download a tarball from git and it works.. you have to download it. then BUILD it. then you will have a custom ui-router. look at your ui-router header in javascript. mine says this..

    /**
     * State-based routing for AngularJS
     * @version v0.2.0-dev-2013-10-05
     * @link http://angular-ui.github.com/
     * @license MIT License, http://www.opensource.org/licenses/MIT
     */
    

    does your's say version 0.2.0-dev-2013-10-05? that date is the date i compiled mine. so your date should be relevant to yours.. if you don't see that in your header of your javascript then you are just using the same 0.2.0 version as the master, you aren't using anything special to make 1.2 animations work...

    here is a pastbin of the compiled ui-router that works with 1.2 try it out. BOOM!

    0.2.0 Angular-ui-router custom build

提交回复
热议问题