SHARE
TWEET

Untitled

a guest Jan 12th, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <ul>
  2. <li v-for="brand in list">
  3.     @{{brand.name}}
  4.     <a href="#"> // how to create href url from brand name that come from Vue response and I want to replace space(' ' ) with dash( '-') and pass to href url
  5.  
  6.                        <img :src="brand.image">
  7.  
  8.     </a>
  9.  
  10. </li>
  11.    
  12. created: function(){
  13.  
  14. axios.get('brand/test-demo').then(response => this.detail = response.data) ;
  15.  
  16. }
  17.    
  18. <a :href="{{url('brand/' + brand.name}} ">
  19.  
  20. <a :href="{{url('brand/'}}" + brand.name ">
  21.    
  22. <a :href="'http://localhost/gift_india/' + brand.name "> // // this one work but I want dynamic URL.
RAW Paste Data
Top