简体   繁体   English

为什么Codelyzer 4删除模板使用公共?

[英]why does codelyzer 4 remove templates-use-public?

Codelyzer 4 has removed templates-use-public. Codelyzer 4删除了template-use-public。 "ng lint" will not report error when accessing a private member in html template. 在html模板中访问私有成员时,“ ng lint”将不会报告错误。 Does any alternative rule exist? 是否存在其他替代规则?

I still know the cause exactly. 我仍然确切地知道原因。 However, in angular 5, "ng test" and "ng build -prod" will report errors when html template accesses private members. 但是,在角度5中,当html模板访问私有成员时,“ ng test”和“ ng build -prod”将报告错误。

From what I see in this issue: https://github.com/mgechev/codelyzer/issues/264 从我在此问题中看到的内容来看: https : //github.com/mgechev/codelyzer/issues/264
Codelyzer now delegates this to angular compiler itself. 现在,Codelyzer将其委托给angular编译器本身。

There is also Angular Language Service, which should check that: https://angular.io/guide/language-service 还有Angular Language Service,应检查以下内容: https : //angular.io/guide/language-service

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

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