I have a question about Call a finction and get return value directly in html better or set return value in a variable and use this variable in html better?
in the html
<div ngIf=isValid()>
</div>
in ts file:
public isValid(): boolean {
}
is this way better or
<div ngIf=isValid>
</div>
in ts file:
public isValid = false;
public isValidValue(): void {
if(){
isValid = true;
}
}
which way ist better?