Skip to content

Commit

Permalink
Parent property values should come from template. Fixes #2504.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Oct 6, 2015
1 parent 45b1e5f commit 23c883b
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 23c883b

Please sign in to comment.