How can I toggle an input to a component using a button, without creating a component property to hold the value?
example:
<button #componentVisibility (click)="componentVisibility.value = !componentVisibility.value" value="false">
show graph
</button>
<my-component [graphVisible]="componentVisibility.value"></my-component>
This one for example is not good because value has to be a string, and I need to toggle a boolean and pass it in.
How can I toggle a local template boolean and pass it in to a component, without creating a component property to hold it?
Note: Doing the following throws a transpile error:
<button (click)="graphVisible ? graphVisible = false:graphVisible = true;" value="false">
show graph
</button>
<my-component [graphVisible]="graphVisible"></my-component>
Error thrown about graphVisible not being a property on the parent component.