I'm trying to use the <template> for a loop for with the <tr> elements
inside a table, like that:
<template ngFor let-row [ngForOf]="rows">
<tr *ngIf="row.id === editRowId">
<td>
<input type="text" ng-model="row.field">
</td>
</tr>
<tr *ngIf="row.id !== editRowId">
<td>
{{row.field}}
</td>
</tr>
</template>
But I have the following error:
before compile: "in the <tr> element "element 'tr' cannot be nested inside
an element <template>"
after compile : "Error: No provider for TemplateRef! at
NoProviderError.BaseError [as constructor]"
Do you know how to solve it?
Note: I'm using VisualStudio2015 for develop that.
Thanks in advance
--
You received this message because you are subscribed to the Google Groups
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.