I would like to be able to execute foo()
once regardless of whether I click on the button once or twice.
<span> (click)="foo()" </span>
foo() {
console.log("You've clicked on foo");
}
I've tried using this stackoverflow answer but clicking on it twice still results in multiple console.logs. How would be able to only run this function once?
Note: Not really looking for triple/quadruple clicks (only single/double)