-
Notifications
You must be signed in to change notification settings - Fork 842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include in client side? #69
Comments
It's possible to write your own function with the same parameters, something like this:
and then using it:
Keep in mind that it might be a bit work to get it to work asyncronously, and that syncronous requests in the main thread are disabled in some browsers (hello Chrome, do you have any friends?). I pre-populate the template cache, so that getCache() always returns a value when it's called. Or at least it tries to... With some restructuring, it's possible to "expose" the include* methods and make your own implementation on the client side, but due to the async nature of ajax requests, perhaps some thought should be given how to promisify this. |
it's possible if you add this function. Be aware that this is a sync request.
after |
Documentation has been updated; see https://github.com/mde/ejs#caveats. |
Only for the documentation DoneJS still covers ejs by its original creators (Bitovi) and ejs is still alive on client side its now called can-ejs and got re Integrated into the CanJS Stack for example the partial client side problem is solved via steal-stache :) if you need a starting point for isomorphic apps and templates simply go to DoneJS.com https://canjs.com/doc/can-ejs.html but for frontend and backend you should use the new https://canjs.com/doc/can-stache.html |
I might be misunderstanding this, but question about #68 - if I can't render a file on the client side, does that mean that I can't include another template this way - i.e. I can't replicate partials?
E.g. this:
is simply not usable client-side? Is there some way to specify a second inline template perhaps?
The text was updated successfully, but these errors were encountered: