I am experimenting with angular2 2.0.0-beta.0
I have a table and the contents of the row are created by angular2 as follows:
<table> <tr *ngFor="#line of data"> .... content .... </tr> </table>
Now this works, and I want to encapsulate the contents in a table-line component.
<table> <table-line *ngFor="#line of data" [data]="line"> </table-line> </table>
And in the component, the template has the content <tr> <td>.
But now the table no longer works. This means that the content is no longer displayed in columns. In the browser, the inspector shows me that the DOM elements look like this:
<table> <table-line ...> <tbody> <tr> ....
How can I do this job?
angular
fbenoit Jan 01 '15 at 12:51 on 2016-01-01 12:51
source share