Can I use interpolation # {} to insert complex expressions into an HTML style attribute using the jade template for nodejs

How can I use interpolation #{} to insert complex expressions into an HTML style attribute?

 span(class="widget_#{widget.number}") 
+4
source share
1 answer

You can use it as a Javascript way.

 span(class="widget_" + widget.number) 
+6
source

Source: https://habr.com/ru/post/1339234/


All Articles