<tbody>
<tr *ngFor="let post of postArray; let i=index">
<td width="10"> {{ i + 1 }} </td>
<td width="200"><img src="{{post.data.postImgPath}}" class="img img-fluid"></td>
<td width="200"> {{post.data.title}} </td>
<td width="300"> {{post.data.excerpt}} </td>
<td>{{post.data.category.category}}</td>
<td>{{post.data.createdAt}}</td>
<td></td>
</tr>
</tbody>
I tried with <td [style.width]="300"> {{post.data.excerpt}}
But is not working either. I tried with:
I tried with <td [style.width.px]="300.px"> {{post.data.excerpt}}
But is not working either.
Can u plaese tell me how to attach width to
Altough I dont understand why you'd want to style the component in the html, heres a way that should work.
Note that it would be better to style the component over classes and a style file (css).