Skip to content
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

Parent property values should come from template. Fixes #2504. #2508

Merged
merged 1 commit into from
Oct 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/lib/template/templatizer.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
* @param {HTMLTemplateElement} template The template to process.
*/
templatize: function(template) {
this._templatized = template;
// TODO(sjmiles): supply _alternate_ content reference missing from root
// templates (not nested). `_content` exists to provide content sharing
// for nested templates.
Expand Down Expand Up @@ -383,8 +384,9 @@
stamp: function(model) {
model = model || {};
if (this._parentProps) {
var templatized = this._templatized;
for (var prop in this._parentProps) {
model[prop] = this[this._parentPropPrefix + prop];
model[prop] = templatized[this._parentPropPrefix + prop];
}
}
return new this.ctor(model, this);
Expand Down