I want to pass a image path from a tag that built by Vue to vue component(MyPost):
<my-post txt="Such a great Framework, Rouzbeh Said!" url="image.png"></my-post> I use parameter in component like this but didn't work:
<img src="{{ url }}" alt="post-picture"> My component in Vue:
<script> Vue.component('MyPost',{ props: ['txt', 'url'], template: ` <div class="col"> <div class="card shadow-sm"> // this line didnt work <img src="{{ url }}" alt="post-picture"> <div class="card-body"> <p class="card-text">{{txt}}</p> <div class="d-flex justify-content-between align-items-center"> <div class="btn-group"> <button type="button" class="btn btn-sm btn-outline-secondary">View</button> <button type="button" class="btn btn-sm btn-outline-secondary">Edit</button> </div> <small class="text-muted">9 mins</small> </div> </div> </div> </div> ` }); var app = new Vue({ el: "#app", }); </script>