title: Angular 9 button click firing multiple times
body: <p>Html</p>
  <pre><code>&lt;button (click)=&quot;myClickFunction($event)&quot;&gt;
     Click Me
  &lt;/button&gt;
  </code></pre>
  <p>app.component.ts</p>
  <pre><code>myClickFunction(event) { 
        //just added console.log which will display the event details 
        console.log('inside myClickFunction');
     }
  </code></pre>
  <p>When I click on the button (named click me) multiple times, the console.log is printing multiple times. How to make it call only the first time irrespective of number of clicks?</p>
  <p>I have tried event.preventdefault(), but getting following error:</p>
  <pre><code>Cannot read property 'preventDefault' of undefined
  </code></pre>
  <p>Any suggestion will be appreciated.</p>