title: Bind click event by class in Angular 2
body: <p>Let's say I have the following template:</p>
  
  <pre><code>&lt;ul&gt;
   &lt;li id="1" class="selectModal"&gt;First&lt;/li&gt;
   &lt;li id="2" class="selectModal"&gt;Second&lt;/li&gt;
   &lt;li id="2" class="selectModal"&gt;Third&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>How can I bind a click event by class in TypeScript, so when a li element is clicked I can get the element and query the ID or any other attribute of the clicked element?</p>