小编A. *_*xon的帖子

延迟加载模块上的 Angular 8 动画错误 - 发现合成属性

我有 2 个模块,app.module和一个lazy.module. 可以想象,它lazy.module是延迟加载到app.modulevia 路由器中的。

const routes: Routes = [
  { path: '', loadChildren: () => import('./lazy/lazy.module').then(m => m.LazyModule) }
];
Run Code Online (Sandbox Code Playgroud)

现在,在 中app.module,我正在导入BrowserModuleBrowserAnimationsModule

@NgModule({
  imports: [ BrowserModule, BrowserAnimationsModule ]
  // ...
})
Run Code Online (Sandbox Code Playgroud)

在 中app.module,我有一个名为flyInOutAnimation

export const flyInOutAnimation = trigger('flyInOut', [
  state('out', style({
    transform: 'translateX(-250px)',
    display: 'none'
  })),
  state('in', style({
    transform: 'translateX(0)'
  })),
  transition('in <=> out', animate('400ms ease-in-out'))
]);
Run Code Online (Sandbox Code Playgroud)

在 中lazy.module,我有一个FlyoutComponent使用上述动画的。 …

angular angular-animations

5
推荐指数
1
解决办法
829
查看次数

标签 统计

angular ×1

angular-animations ×1