I am trying to declare an index in *ngFor but I am getting a type error and it is saying
<div class='text' *ngFor='let item of blogs; let i = index | async | filter : 'feat' : true'>
If I take out let i = index
it works fine, but I want to use the index, so I can apply css classes to the elements. Looking at documentation, this is how you are supposed to do it.
It pipe should come before the index
<div class='text' *ngFor='let item of blogs | async | filter : 'feat' : true'; let i = index >
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With