Using ternary with href in AngularJS
<p>If <code>type=1</code>, then I want the url to use the variable <code>{{vm.firstPath}}</code>.
For anything else it should use <code>{{vm.secondPath}}</code>.</p>

<p>Is this doable using a ternary? </p>

<p>When I tried doing this it is not recognised:</p>

<pre><code>{{type==1? &lt;a href="{{vm.firstPath}}"&gt;{{vm.name}}&lt;/a&gt; : &lt;a href="{{vm.secondPath}}"&gt;{{vm.name}}&lt;/a&gt;}}
</code></pre>