title: vuejs set a radio button checked if statement is true
body: <p>I am trying to make a radio button checked using vuejs v-for only if my if-statement is true. Is there a way to use vuejs' v-if/v-else for this type of problem? </p>
  
  <p>in php and html I can achieve this by doing the following:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input type="radio" &lt;? if(portal.id == currentPortalId) ? 'checked="checked"' : ''?&gt;&gt;
  </code></pre>
  
  <p>Below is what I have so far using vuejs: </p>
  
  <pre class="lang-html prettyprint-override"><code>    &lt;div v-for="portal in portals"&gt;
       &lt;input type="radio" id="{{portal.id}}" name="portalSelect"
         v-bind:value="{id: portal.id, name: portal.name}"
         v-model="newPortalSelect"
         v-on:change="showSellers"
         v-if="{{portal.id == currentPortalId}}"
         checked="checked"&gt;
       &lt;label for="{{portal.id}}"&gt;{{portal.name}}&lt;/label&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>I know the v-if statement here is for checking whether to show or hide the input. </p>
  
  <p>Any help would be very much appreciated.</p>