Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Google マップを生成するために、jade テンプレートでインライン JavaScript を使用しています。私の問題は次のとおりです:ノード/エクスプレスコントローラーからこのインラインjavascriptスニペットに変数/オブジェクトを渡すにはどうすればよいですか?
何か案は?ありがとう
app.js:
app.get('/', function(req, res){ res.render('index.jade', { title: 'My Site', variable: { javascript: 'object' } }); });
index.jade:
- var header = 'this is from an ' + variable.javascript; h1= header