title: how to pass an anonymous function to an Angular template
body: <p>in Angular template, how to do something like that:</p>
  
  <pre><code>&lt;div (click)="(()=&gt;{})()"&gt; click here &lt;/div&gt;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&lt;div (click)="(function(){})()"&gt; click here &lt;/div&gt;
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>&lt;div (click)="myfunction()"&gt; click here &lt;/div&gt;
  </code></pre>
  
  <p>and then defining <code>myfunction</code> in the component controller.</p>