L
L
lolrofl012018-11-12 18:55:18
Vue.js
lolrofl01, 2018-11-12 18:55:18

How to place vue variable inside quotes?

Probably a very stupid question, but this line works fine:
{{ news.img }} и {{ news.title }}
But this one causes a mountain of errors: And then how to place the image?
<img src="{{ news.img }}" alt="{{ news.title }}">

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Proskurin, 2018-11-12
@lolrofl01

<img :src="news.image">

R
Rasul Turganov, 2018-11-12
@rasult22

<img v-bind:src = "news.image">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question