Open elementalTIMING opened 5 years ago
Not really any other way.
You could theoretically have a function return a function like this:
[visible]="isVisible(true)"
isVisible(oppositeDay: boolean) {
return () => {
if(oppositeDay) {
return false;
} else {
return true;
}
}
}
As far as I understood the [visible] get a function that returns true or false. Is there any way to invert the result?
For example: I have two different menu items. The one shall be shown when a variable value is true and the other value shall be hidden - and vice versa.
The only working solution I found is to have two different functions to call - but this is a bit "strange". Is there any other way to do this?