0
点赞
收藏
分享

微信扫一扫

Angular NG05105: Unexpected synthetic listener @dialogContainer.start found. Please make sure that:


使用Dialog组件出现动画相关报错

ERROR Error: NG05105: Unexpected synthetic listener @dialogContainer.start found. Please make sure that:
  - Either `BrowserAnimationsModule` or `NoopAnimationsModule` are imported in your application.
  - There is corresponding configuration for the animation named `@dialogContainer.start` defined in the `animations` field of the `@Component` decorator (see https://angular.io/api/core/Component#animations).

修复:
app.module.ts

import { BrowserAnimationsModule } from "@angular/platform-browser/animations";


@NgModule({
  declarations: [...],
  imports: [
    FormsModule,
    BrowserModule,
    ...
    BrowserAnimationsModule,
  ],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {
...


举报

相关推荐

0 条评论