title: VueJS check if string contains substring in if-statement in v-btn tag
body: <p>My goal is to check if the link from a json object contains 'http' if yes, give the v-btn a target='_blank' . It can also be for example a #test link.</p>
  
  <p>How I do it now is:</p>
  
  <pre><code>&lt;v-btn
  color="primary"
  text
  :href="x.link"
  x.link.includes("http") ? target="_blank" : null
  &gt;
      Read more
  &lt;/v-btn&gt;
  </code></pre>
  
  <p>That gives this error message with an arrow to the first dubble quote by http
  <code>error: Parsing error: unexpected-character-in-attribute-name</code></p>
  
  <p>This is what is in x:</p>
  
  <pre><code>0:Object
  created_at:null
  header:"Sport"
  id:1
  image_large:"https://i.picsum.photos/id/389/800/400.jpg"
  image_medium:"https://i.picsum.photos/id/389/600/300.jpg"
  image_small:"https://i.picsum.photos/id/389/200/200.jpg"
  link:"http://example.com"
  submenu:null
  updated_at:null
  </code></pre>
  
  <p>Some objs have as link <code>link:"#test"</code></p>
  
  <p>So the code gives an error on the .includes but I can't really find anything that solves this problem or finds a way around it.</p>
  
  <p>I hope my request is clear. Thanks for the help</p>