HughDai / embeddedjavascript

EJS cleans the HTML out of your JavaScript with client side templates
http://code.google.com/p/embeddedjavascript
Other
0 stars 0 forks source link

EJSView.prototype.partial #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, 

Do you have an idea why the partial method was removed in the last version of 
ejs.

Thanks in advance.

Benjamin

Original issue reported on code.google.com by Benjamin...@gmail.com on 22 Apr 2010 at 1:32

GoogleCodeExporter commented 9 years ago
Because partials are an unneeded layover from rails.  You can still do nested 
views 
however.

Original comment by JustinBMeyer@gmail.com on 22 Apr 2010 at 5:08

GoogleCodeExporter commented 9 years ago
The 'advertisement' and documentation/demo of partials should probably be 
removed
from http://embeddedjs.com/, perhaps with an explanation of a better approach, 
or why
they're considered unnecessary. I was confused about it until I noticed the 
source
code on the demo page was different than the latest release and I started 
browsing
the SVN history.

Original comment by matt.che...@gmail.com on 28 Apr 2010 at 1:57

GoogleCodeExporter commented 9 years ago
this also tripped me up.  how do you propose we do nested views?

Original comment by aaron.bl...@gmail.com on 12 Jul 2010 at 4:44

GoogleCodeExporter commented 9 years ago
bump

Original comment by eritiru...@gmail.com on 2 Jan 2012 at 3:24

GoogleCodeExporter commented 9 years ago
bump

Original comment by stephanf...@gmail.com on 20 May 2012 at 1:03

GoogleCodeExporter commented 9 years ago
bump

Original comment by krostkow...@pretius.com on 16 Dec 2012 at 9:18

GoogleCodeExporter commented 9 years ago
bump

Original comment by andygoes...@gmail.com on 4 Sep 2013 at 3:58

GoogleCodeExporter commented 9 years ago
Hi,
Until this issue gets fixed I'm switching to a different template engine 
(http://garann.github.io/template-chooser/).
Thanks!

Original comment by rbarcelo...@gmail.com on 28 Nov 2013 at 3:01

GoogleCodeExporter commented 9 years ago
Hi,

Nunjucks (http://jlongster.github.io/nunjucks/) seems to work for me.
Example of running partial:
*** main index.html (only javascript shown) ***
nunjucks.configure('templates', { autoescape: true });
nunjucks.render('header.html', function(error, result) { 
$('#header').html(result) });

*** template at templates/header.html ***
Hello {% include "partials/world.html" %}

*** partial at partials/world.html ***
World!

Hope it helps :)

Original comment by rbarcelo...@gmail.com on 29 Nov 2013 at 12:26