I have a button that gets its value and text dynamically from a component. Upon click of the button, I would like to pass the value to a function in the component.
<button class="btn btn-sm btn-primary"
value="{{ actionButton.value }}"
(click)="doSomething()">{{ actionButton.text }}</button>
doSomething() {
//Get value from the button clicked.
//Do something with it.
}
Is there a way to pass the event?
(click)="doSomething(actionButton.value)"?