如何修复 Angular 错误 TS2552: Cannot find name 'Input'. Did you mean 'oninput'?
问题:
编译 Angular 应用程序时你看到以下错误消息:
error.txt
Error: src/app/my/my.component.ts:9:4 - error TS2552: Cannot find name 'Input'. Did you mean 'oninput'?解决方案
打开你的模块文件,例如 my.component.ts 并在顶部添加以下行:
my.component.ts
import { Input } from '@angular/core';Check out similar posts by category:
Angular, Typescript
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow