We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi Soundstep:
http://plnkr.co/edit/gHwT7PPCgpjIjv2pIcfT?p=preview
Is this expected functionality? I require that a template can be compiled from mark-up, instantiating any templates contained in that markup.
This is more my situation:
function XTemplate (template, scope, element) { var markup = require('./templates/_xTemplate.html'); template.compile(); scope = template.scope; }
_xTemplate.html
<div data-template="YTemplate"></div> <div data-template="ZTemplate"></div>
If this issue won't be fixed for a while, how might I circumvent this limitation for the time being?
Many thanks, hope you are doing well.
Yours, Rob.
The text was updated successfully, but these errors were encountered:
The data-template is kind of a shortcut but should probably not be used for something more complicated.
If you look at the code, the data-template is parsed on a DOM Ready event, so I'm not surprised it is not parsed again on an async call:
https://github.com/soundstep/soma-template/blob/master/build/soma-template.js#L1468
It is also a bit strange to use data-template, and then re-compile it with another piece of html.
I suggest you instantiate the templates yourself rather than using the data-template attribute.
target.innerHTML = partials['body.tpl.html']; var template = soma.template.create(target.firstChild); var scope = template.scope;
In case that helps, if you don't want to asynchronously loads your html. I've created a grunt plugin to convert html to javascript:
https://www.npmjs.com/package/grunt-html-convert
Sorry, something went wrong.
No branches or pull requests
Hi Soundstep:
http://plnkr.co/edit/gHwT7PPCgpjIjv2pIcfT?p=preview
Is this expected functionality? I require that a template can be compiled from mark-up, instantiating any templates contained in that markup.
This is more my situation:
_xTemplate.html
If this issue won't be fixed for a while, how might I circumvent this limitation for the time being?
Many thanks, hope you are doing well.
Yours,
Rob.
The text was updated successfully, but these errors were encountered: