title: angular2 template div on click check if element has class
body: <p>I currently have some logic that I would like to simplify if possible using only the html template on (click)</p>
  
  <p>I have a collapsible div that when clicked, becomes "active"</p>
  
  <p>currently my div is:</p>
  
  <pre><code>&lt;div class="collapsible-header blue darken-2" (click)="getDataForTable($event)"&gt;
  </code></pre>
  
  <p>I am then checking for the list of classes on the element</p>
  
  <pre><code>function getDataForTable($event: any){
    let classList = $event.target.classList;
  
    if(classList.contains("active")){
    //do nothing div is closing
    } else {
    //get data for table since we are opening the div to show the body
    }
  }
  </code></pre>
  
  <p>I want this <code>(click)</code> action only to fire if the class is not "active" 
  (meaning don't fire when clicked as "active");</p>
  
  <p>how can I do this with template syntax only?</p>