title: If/Else statement within ng-click
body: <p>I am trying to create a conditional statement within my <code>ng-click</code> function. I have the <code>if</code> working, but now I need to figure out how to get an <code>else</code>. I have the following code currently:</p>
  
  <pre><code>&lt;div ng-click="item.subCategory.length &gt; 1 &amp;&amp; showSubCategories();"&gt;
  </code></pre>
  
  <p>This runs a function to display my sub-categories if there is more than 1 sub-category within a category. What I would like to do is expand on it so that I can run a different function if there is only 1 sub-category.</p>
  
  <p>In Javascript the statement would look like this:</p>
  
  <pre><code>if (item.subCategory.length &gt; 1) {
      showSubCategories();
  } else {
      showProducts();
  }
  </code></pre>
  
  <p>Is it possible to do that within an <code>ng-click</code>? </p>