0

如何在 ui-views 中应用动画?

我找到了代码

// Unfortunately there is no neat way to ask $injector if a service exists
  var $animator; try { $animator = $injector.get('$animator'); } catch (e) { /* do nothing */ }

但是我怎样才能注入动画师呢?

4

1 回答 1

1

这不是一个相关的问题。如果您使用的是足够新的 AngularJS 版本(即 1.1.5),它本身就可以工作。

有关详细信息,请参阅文档:https ://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions#how-to-animate-ui-view-with-ng-animate

于 2013-09-20T21:40:02.047 回答