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
Have a trouble with data mapping if used partials. It can be illustrated on expamle from your README.md
README.md
var partial = '<li class="partial"></li>'; var base = '<div><h1 class="foo"></h1><ul class="menu"></ul></div>'; var baseData = { foo: 'bar' }; var mapping = Plates.Map(); mapping.class('menu').append(partial); console.log(Plates.bind(base, baseData, mapping));
Results is:
<div><h1 class="foo"></h1><ul class="menu"><li class="partial"></li></ul></div>
foo = 'bar' was not rendered!
foo = 'bar'
The text was updated successfully, but these errors were encountered:
I found that only html of partials mapped by baseData in the .bind (not base that passed in the args). https://github.com/flatiron/plates/blob/master/lib/plates.js#L350
baseData
.bind
base
So when foo moved to the partial
foo
partial
var partial = '<li class="partial"><p class="foo"></p></li>',
Bind returns
<div><h1 class="foo"></h1><ul class="menu"> <li class="partial"><p class="foo">bar</p></li></ul></div>
As found this issue refers to the #76
Sorry, something went wrong.
No branches or pull requests
Have a trouble with data mapping if used partials.
It can be illustrated on expamle from your
README.md
Results is:
foo = 'bar'
was not rendered!The text was updated successfully, but these errors were encountered: