Route-Dependent CSS Page Transitions in AngularJS

前端 未结 2 923
渐次进展
渐次进展 2020-12-15 00:55

I am new to AngularJS and would like to implement route dependent page transitions. For example, I would like the page to slide left, slide right or fade depending on the ro

2条回答
  •  南笙
    南笙 (楼主)
    2020-12-15 01:44

    Currently my approach to this is to check whether angular is already within a digest cycle or not by using this snippet:

    if (!($scope.$$phase)) $scope.$apply();
    

    That's not very pretty, but unfortunately it's the only approach I've discovered so far for exactly the problem you're describing.

提交回复
热议问题