【发布时间】:2018-03-30 17:04:46
【问题描述】:
我遇到了这个奇怪的错误,没有找到类似的东西.. 我在我的网站上使用 ng2-canvas-whiteboard 组件作为绘图画布,一切工作正常,除非我尝试使用以下方法引用该画布:
@ViewChild('canvasWhiteboard') canvasWhiteboard: CanvasWhiteboardComponent;
正如官方文档建议的那样,我收到了这个错误:
Failed to compile.
e:/frontend/src/app/components/user/dashboard/dashboard.component.ts (15,2): Cannot find name 'ViewChild'.
有什么建议吗?谢谢
【问题讨论】: