I want to bind a result of a function inside my [ngClass]
condition, but it's simply not doing anything.
HTML
<div [ngClass]="{hover': check(token.ids)}" *ngFor="let tokens of info.data">
I trying to return a boolean from the function and nothing happens, but When I log it inside the console I receiving true or false value depending on the passed elements.
check(tokens) {
tokens.forEach(token => {
if (token.id === this.currentToken) {
return true
}
});
}