Search code examples
node.jspug

Jade Syntax does not work with pug : Node Js


I am in a situation where I have one anchor tag in pug template: The href tag is getting its value at runtime. This code was working with Jade but as soon as I take it to pug, It stops working

a.more(href='/posts/show/#{post._id}') Read more

in the above syntax #{post._id} is suppose the bring the data at runtime but it is not working as expected.

Please help me on this.


Solution

  • Just got it resolved by using the following line

     href="/posts/show/" + post._id
    

    Its kind of weird that they stopped support for jade syntax in pug.