Codelyzer: Template micro-syntax closure and 'bind only to public class members'

Created on 23 Jan 2017  路  3Comments  路  Source: mgechev/codelyzer

This

<div *ngFor="let smile of smile">
  <smile-cmp [smile]="smile"></smile-cmp>
</div>
constructor(private smile: SmileService,



md5-e9f3034a03c78600b490d212b0e45e5f



You can bind only to public class members.
bug P3

Most helpful comment

Good catch! I'll include fix in one of the next releases. Since the issue is not very high-priority, the fix might not be introduced as part of beta.5.

All 3 comments

Good catch! I'll include fix in one of the next releases. Since the issue is not very high-priority, the fix might not be introduced as part of beta.5.

Having the same exact problem right now.
Quite annoying :D

In fact, there are two issues here:

  • The smile inside ngFor should be reported, since it's not public.
  • The smile declared in the lexical scope of <div/> should not be reported.

Publishing a fix for the second one.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rolandjitsu picture rolandjitsu  路  5Comments

wKoza picture wKoza  路  6Comments

marbug picture marbug  路  3Comments

KKrisu picture KKrisu  路  5Comments

fabioemoutinho picture fabioemoutinho  路  5Comments