使用NzPicker的NzNoAnimation错误(nz-year-picker)

时间:2019-05-29 10:18:27

标签: angular antd

使用NzPicker时,出现以下错误。

添加NzNoanimationModule相同。

我该如何解决?

<nz-year-picker (ngModelChange)="onChange($event)" nzPlaceHolder="select year">
      </nz-year-picker>
NzPickerComponent.html:81 ERROR TypeError: Object(...) is not a function
at NzNoAnimationDirective.push../node_modules/ng-zorro-antd/fesm5/ng-zorro-antd-core.js.NzNoAnimationDirective.updateClass (ng-zorro-antd-core.js:590)
at NzNoAnimationDirective.push../node_modules/ng-zorro-antd/fesm5/ng-zorro-antd-core.js.NzNoAnimationDirective.ngOnChanges (ng-zorro-antd-core.js:569)
at checkAndUpdateDirectiveInline (core.js:17976)
at checkAndUpdateNodeInline (core.js:26042)
at checkAndUpdateNode (core.js:26004)
at debugCheckAndUpdateNode (core.js:26638)
at debugCheckDirectivesFn (core.js:26598)
at Object.eval [as updateDirectives] (NzPickerComponent.html:81)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:26590)
at checkAndUpdateView (core.js:25986)
View_NzPickerComponent_10 @ NzPickerComponent.html:81
push../node_modules/@angular/core/fesm5/core.js.DebugContext_.logError @ core.js:26818
push../node_modules/@angular/core/fesm5/core.js.ErrorHandler.handleError @ core.js:5615
(anonymous) @ core.js:23680
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391
push../node_modules/zone.js/dist/zone.js.Zone.run @ zone.js:150

1 个答案:

答案 0 :(得分:0)

原因未找到@ angular / cdk / coercion。