Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template micro-syntax closure and 'bind only to public class members' #220

Closed
artaommahe opened this issue Jan 23, 2017 · 3 comments
Closed
Assignees
Labels

Comments

@artaommahe
Copy link

artaommahe commented Jan 23, 2017

This

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

will provide error

You can bind only to public class members.
@mgechev
Copy link
Owner

mgechev commented Jan 23, 2017

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.

@mgechev mgechev self-assigned this Jan 23, 2017
@mgechev mgechev added this to the 2.0.0-Beta 5 Flightside milestone Jan 23, 2017
@mgechev mgechev modified the milestones: 2.0.0-Beta 5 Flightside, 2.0.2 - Actualism Feb 19, 2017
@Shahor
Copy link

Shahor commented Feb 22, 2017

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

@mgechev
Copy link
Owner

mgechev commented May 8, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants