title: How to get element reference name in angular 8
body: <p>Tried to get element reference name but not working.If anyone know please help to find the solution.</p>
  
  <p>alert should be like container.Because that is element reference.</p>
  
  <p>app.component.html:</p>
  
  <pre><code>&lt;div (click)="test(event)" #container&gt;&lt;/div&gt;
  </code></pre>
  
  <p>app.component.ts:</p>
  
  <pre><code>test(e){
     alert(e.elementRef);
     //Output should be like alert("container");
  }
  </code></pre>