How to pass a html element property/attribute in the event handler in Angular 2?
<p>I have a list of data which i display in the html template this way.</p>

<pre><code>&lt;div&gt;
   &lt;a (click)='onClick(this)' someproperty='test'&gt;&lt;/a&gt;
   &lt;a (click)='onClick(this)' someproperty='test'&gt;&lt;/a&gt;
   &lt;a (click)='onClick(this)' someproperty='test'&gt;&lt;/a&gt;
   &lt;a (click)='onClick(this)' someproperty='test'&gt;&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>I want to change one property dynamically whenever i click an item. However, Angular is showing the object as undefined.</p>

<p>here is my Component:</p>

<pre><code>declare var $:any;
export class MyComponent {
  onClick(someobject): void {
    $(someobject).attr('someproperty','dontTest');//console shows "Undefined"

  }
}
</code></pre>