title: Using ng-if as a switch inside ng-repeat?
body: <p>I am working on Angular app. I tried to use ng-if and switch inside <strong>ng-repeat</strong> but didn't succeed. I have data like:</p>
  
  <pre><code>   **[{"_id":"52fb84fac6b93c152d8b4569",
         "post_id":"52fb84fac6b93c152d8b4567",
         "user_id":"52df9ab5c6b93c8e2a8b4567",
         "type":"hoot",},  
        {"_id":"52fb798cc6b93c74298b4568",
         "post_id":"52fb798cc6b93c74298b4567",
         "user_id":"52df9ab5c6b93c8e2a8b4567",
         "type":"story",},        
        {"_id":"52fb7977c6b93c5c2c8b456b",
         "post_id":"52fb7977c6b93c5c2c8b456a",
         "user_id":"52df9ab5c6b93c8e2a8b4567",
         "type":"article",},**
  </code></pre>
  
  <p>$scope.comments = data mentioned above<br>
  and my Html like :             </p>
  
  <pre><code>   &lt;div ng-repeat = "data in comments"&gt;
        &lt;div ng-if="hoot == data.type"&gt;
            //differnt template with hoot data
         &lt;/div&gt;
        &lt;div ng-if="story == data.type"&gt;
            //differnt template with story data
         &lt;/div&gt;
         &lt;div ng-if="article == data.type"&gt;
            //differnt template with article data
         &lt;/div&gt; 
     &lt;/div&gt;
  </code></pre>
  
  <p>How can I achieve this thing in Angular? </p>