Angular2 Table Row component on Chrome displays in single column

青春壹個敷衍的年華 提交于 2019-12-02 00:34:32

You can't have a <row-component> inside a <tbody> because that is not a valid child for <tbody>.

You can change the selector of RowComponent to [rowComponent] and then use it like

<tr rowComponent *ngFor="let qlines of qlineModel" 
                        [qline]="qlines">

Using a selector: 'tr[row-component]' in RowComponent would allow you to render

<table>
    <thead><!-- headers go here --></thead>
    <tbody>
        <tr row-component *ngFor="let qlines of qlineModel" [qline]="qlines"></tr>
    </tbody>
</table>

This is rendered correctly both on Chrome and IE.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!