Reputation: 531
in my .jade
, I set a data-id
with the _id
a User model of mondodb, the problem is that the jade saves it with double """"
. This is the jade
body(data-id = user._id)
And this is the output in html
data-id="567ab00e5a09b86915937f9b"
If i try with
body(id = user._id)
then the output is
id=""567ab00e5a09b86915937f9b""
I cannot understand the problem. Thank you in advance
Upvotes: 1
Views: 134
Reputation: 13814
You can bind using #{variable}
syntax instead:
body(data-id="#{user._id}")
Upvotes: 1