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

Not working anymore on angular 2.1 #1

Open
Xample opened this issue Nov 10, 2016 · 3 comments
Open

Not working anymore on angular 2.1 #1

Xample opened this issue Nov 10, 2016 · 3 comments

Comments

@Xample
Copy link

Xample commented Nov 10, 2016

as the "ngFor" syntax changed, the component would need to be updated

@Xample
Copy link
Author

Xample commented Nov 10, 2016

http://acdcjunior.github.io/angular2-template-inside-expressions-deprecated-use-let-instead.html

I tried making a POC updating to 2.1, I can pass the template but not the context.
Actually, I am not sure to know how to rewrite (update) this div-template

<div template="#item">
      Inline template item #: {{item}}
  </div>

@ilio
Copy link
Owner

ilio commented Nov 14, 2016

Hi, thanks for your feedback, please try to replace *ngFor="#item of items" with *ngFor="let item of items"

@Xample
Copy link
Author

Xample commented Nov 15, 2016

I had to change the way to capture the template as well, something like:

    <template #itemTemplate let-data="data">
      {{data}}
    </template>

Then into the controller itself instead of "TemplateRef"

  @ContentChild('itemTemplate') private itemTemplate: ElementRef;

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

No branches or pull requests

2 participants