Answer the question
In order to leave comments, you need to log in
Jade template, how to pass data to script tag?
We have a jade page template to which the data array data.Asisstants is passed beautifully (res.render)
extends layout
block content
- var Asisstants = data.Asisstants
- var len1 = Asisstants.length
// так данные передаются
p= 'len1: ' + len1
script.
// так не работает(
var TS = data.Asisstants;
//
var len2 = TS.length;
document.writeln('len2: ' + len2);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question