Assignment 6 part 3

Not sure how to get past this point. I can’t seem to figure out how to change the CSS class using a method. I figured I would throw it up on here to see if anyone else has been stuck and could maybe throw some advice my way. I have checked multiple resources on the type of specs we need to get this part done but almost all of them called it without the CSS. Does the syntax allow me to apply a method that changes the CSS? Without an *ngIf?

I have been using this.type to check for “Space Debris” and returned the correct boolean for the “if” statement. I figured I would be able to use [class.warning]=“isSpaceDebris()”, but the dev tools tell me that it isn’t a function. I thought calling “isSpaceDebris()” would return the boolean. Every time I use [class.warning]=“true”, I receive results like the picture above. Currently been stuck for about a day or two now.

Are you calling isSpaceDebris() by itself? If so you need to do satellite.isSpaceDebris(). Replace satellite with whatever you named your variable in the ngfor loop.

*ngFor = “let item of satellites” would be item.isSpaceDebris()

Thank you so much!!!