javascript - render complex html in express.js node.js -


i use node.js 0.10.12 , express.js 4.2.0

i want set app.engine render complex html files, files contain javascript and/or php functions.

i tried drew noakes's answer here, nothing. in case have

app.set('views', './views'); app.engine('html', require('jade').renderfile);  app.get('/', function(req, res) { res.render('qs.html'); }); 

and when visit page, get

syntaxerror: views\qs.html:27 25| <p>the hash has end of url, well-defined.<br> 26| when click add hash first , query string, page not reload , query string added after hash, wich both wrong</p> > 27| =============================<br> 28| <button name="hey1" onclick="historytestindex();">history test index</button> 29| <button name="hey2" onclick="historytestajaxtwo();">history test ajaxtwo</button> 30| <button name="hey3" onclick="historytestajaxfour();">history test ajaxfour</button> unexpected token === @ function (<anonymous>) @ assertexpression (c:\program files (x86)\nodejs\secondtest\node_modules\jade\lib\lexer.js:30:3) @ object.lexer.code (c:\program files (x86)\nodejs\secondtest\node_modules\jade\lib\lexer.js:570:23) @ object.lexer.next (c:\program files (x86)\nodejs\secondtest\node_modules\jade\lib\lexer.js:864:15) @ object.lexer.lookahead (c:\program files (x86)\nodejs\secondtest\node_modules\jade\lib\lexer.js:113:46) @ parser.lookahead (c:\program files (x86)\nodejs\secondtest\node_modules\jade\lib\parser.js:100:23) @ parser.peek (c:\program files (x86)\nodejs\secondtest\node_modules\jade\lib\parser.js:77:17) @ parser.tag (c:\program files (x86)\nodejs\secondtest\node_modules\jade\lib\parser.js:791:30) @ parser.parsetag (c:\program files (x86)\nodejs\secondtest\node_modules\jade\lib\parser.js:719:17) @ parser.parseexpr (c:\program files (x86)\nodejs\secondtest\node_modules\jade\lib\parser.js:188:21) 

i guess finds syntax errors, dont why, since paired html jade.

please, there got way render complex html+js+php files node+express.

thanks


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -