简体   繁体   English

Intellij angular 检测到 html 中不存在的错误

[英]Intellij angular detects errors in html that does not exist

Intellij detects errors in the html which does not exist as if it did not take into account the node modules, of course the project is fully functional it is just the IDE which displays these errors. Intellij 检测到 html 中不存在的错误,就好像它没有考虑节点模块一样,当然该项目功能齐全,它只是显示这些错误的 IDE。

Intellij 错误

Here are the types of error it shows:以下是它显示的错误类型:

Attribute baseChart is not allowed here
Property data is not provided by any applicable directives nor by canvas element

I know leaving errors doesn't change anything in the project but it's quite confusing to have to code with this.我知道留下错误不会改变项目中的任何内容,但是必须使用此代码进行编码非常令人困惑。

Because The name of selector component is the same with native <canvas> element.因为选择器组件的名称与原生的<canvas>元素相同。 If you don't want it to show as error you can edit configuration by:如果您不希望它显示为错误,您可以通过以下方式编辑配置:

Settings/Preferences > Inspections > Angular > Undefined bidding

and change Severity from Error to any other type, but this way it will cause to all of cases even it truly wrong.并将Severity从 Error 更改为任何其他类型,但这样会导致所有情况,即使它确实是错误的。

Support for the new Angular package format introduced in Angular 13 is available since IDE version 2021.3 (see WEB-53312 ); Support for the new Angular package format introduced in Angular 13 is available since IDE version 2021.3 (see WEB-53312 ); Angular 14 support ( standalone components , etc.) is added in version 2022.2. Angular 14 支持( 独立组件等)在 2022.2 版本中添加。 To be able to work with the recent Angular versions, please consider upgrading IDEA为了能够使用最近的 Angular 版本,请考虑升级 IDEA

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM