Am I doing something wrong? Here is a simple for loop
*ngFor="let group of (groups | slice: 0:5)"
[id]="group.GroupNum"
When I do it this way i get
Identifier 'GroupNum' is not defined. 'T' does not contain such a member
If I remove the pipe then the error goes away. I believe the error is just with the Angular Language Service (VS Code) as the code still works as I would expect and the Angular CLI does not give me any errors.
If someone could point me in the right direction I would appreciate it.
P.S. The interface for groups
is defined and if I change it to any
it still gives me the error.
*ngFor="let group of $any(groups | slice:0:5)"
$any will remove the error of "Object is unknow"
Removing the whitespace in the argument should work.
*ngFor="let group of (groups | slice:0:5)"
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