Closed ghost closed 11 years ago
Closing this issue since it already exists on Stackoverflow.
I'll try to respond to your question there. Thanks!
Posted a comment on Stackoverflow. Please feel free to respond at your convenience. I'd be happy to help. Thanks!
so the question was removed from stack overflow.
Happy 2014! Those SO guys are always removing useful stuff... Someone should re-implement their site in Node+Meteor+Blade+Coffeescript just without the "close question" feature... :)
Anyway I recovered some of what was said:
(Found from http://web.archive.org/web/20130504104405/http://stackoverflow.com/questions/16312307/jade-blade-template-conversion )
Now I read it, I see that it is useless. Archived too early!
Also, here is a page with no answers, but it's a good place to put them when they are found. ;) https://github.com/bminer/node-blade/wiki/Migrating-from-jade-to-blade
@joeytwiddle - Thanks. Yeah, if there are any questions, please feel free to shoot me an email or post to StackOverflow with the node-blade
tag.
Hi,
I'm converting from Jade to Blade using ExpressJS as the base Node.js HTTP server, and I'm having a bit of trouble.
Below is a "conversion" list of issues I'm running into which don't necessarily seem apparent from the docs after a few pass-throughs and some trial-n'-error runs, any insights would be helpful!
1) Passing JSON from the Express route to a Javascript "window.data" object. 2) Dynamically including templates passed from the Express route to a Blade file. 3) Dynamically referencing assets passed from the Express route to a Blade file. 4) Underscore templates (this is a Marionette.js app).
Notes:
1) With Jade, I could not dynamically "include" the passed data.templates because they obviously don't support that...it's noted in the comments :)
2) I actually haven't gotten to the Underscore templates yet because I'm still trying to convert the rest of the stuff. It really sucked having to delimit Underscore template code with
|
AND use standard HTML.3) I was able to get the "data" object printed as a string, but I can't seem to iterate over it in Blade for the life of me. I'm probably thinking "Jade" and not "Blade".
server.coffee:
pages/one/layout.jade:
pages/one/templates.jade:
js/dynamic_js_1.js: