title: How can I put a condition inside a data binding in AngularJS?
body: <p>I would like to do the following:</p>
  
  <pre><code>&lt;div&gt;
      &lt;div ng-repeat="row in test.active"&gt;
          &lt;div&gt;{{ row.id }}&lt;/div&gt;
          &lt;div&gt;
              {{ if (row.testTypeId == 1) { test.exams.dataMap[row.examId].name; } }}
              {{ if (row.testTypeId == 2) { test.topics.topicNameMap[row.topicId] } }}
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>However this is giving me an error with the { inside of the {{ }}. Is there another way I could make this work?</p>