File tree 2 files changed +36
-1
lines changed
2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 416
416
if ( this . _parentProps ) {
417
417
var templatized = this . _templatized ;
418
418
for ( var prop in this . _parentProps ) {
419
- model [ prop ] = templatized [ this . _parentPropPrefix + prop ] ;
419
+ if ( model [ prop ] === undefined ) {
420
+ model [ prop ] = templatized [ this . _parentPropPrefix + prop ] ;
421
+ }
420
422
}
421
423
}
422
424
return new this . ctor ( model , this ) ;
Original file line number Diff line number Diff line change 21
21
< span > {{text}}</ span >
22
22
</ template >
23
23
24
+ < dom-module id ="test-dom-template ">
25
+ < template >
26
+ < template is ="dom-template " id ="tmpl ">
27
+ < span > {{text}}</ span >
28
+ </ template >
29
+ </ template >
30
+ < script >
31
+ Polymer ( {
32
+ is : 'test-dom-template' ,
33
+
34
+ properties : {
35
+ value : String
36
+ } ,
37
+
38
+ ready : function ( ) {
39
+
40
+ var tmpl = this . $ . tmpl . stamp ( {
41
+ text : 'ohai'
42
+ } ) ;
43
+
44
+ this . value = tmpl . root . textContent . trim ( ) ;
45
+ }
46
+ } ) ;
47
+ </ script >
48
+ </ dom-module >
49
+
50
+ < test-dom-template id ="testDom "> </ test-dom-template >
51
+
24
52
< script >
25
53
26
54
suite ( '<dom-template>' , function ( ) {
31
59
assert . equal ( row . root . textContent . trim ( ) , 'ohai' ) ;
32
60
} ) ;
33
61
62
+ test ( 'stamps within an element' , function ( ) {
63
+ var template = document . querySelector ( '#testDom' ) ;
64
+ assert . equal ( template . value , 'ohai' ) ;
65
+ } ) ;
66
+
34
67
} ) ;
35
68
36
69
</ script >
You can’t perform that action at this time.
0 commit comments