M
M
Maxim Tarabrin2017-10-02 20:03:58
JavaScript
Maxim Tarabrin, 2017-10-02 20:03:58

How to interpolate a string in Jade & Pug?

Here is some block with img googleapi. How to interpolate a string using the pug preprocessor.
I tried the method below - it does not go out, it outputs to the browser as it is written, without conversion.

.panel-body
    img.img-responsive.img-rounded(src="http://maps.googleapis.com/maps/api/staticmap?center=#{location.coords.lat},#{location.coords.lng}&zoom=17&size=400x350&sensor=false&markers=#{location.coords.lat},#{location.coords.lng}&scale=2")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
levchak0910, 2017-10-02
@padr1no

src=`....`

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question