-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…nstances. This api should be used to insert instances into the dom.
- Loading branch information
Steven Orvell
committed
Apr 4, 2017
1 parent
6ca0927
commit 9860cff
Showing
4 changed files
with
84 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!-- | ||
@license | ||
Copyright (c) 2017 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
--> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script> | ||
<link rel="import" href="../../polymer.html"> | ||
</head> | ||
<body> | ||
<dom-module id="grandchild-element"> | ||
<script> | ||
Polymer({ | ||
is: 'grandchild-element', | ||
ready: function(){ | ||
console.log('grandchild-element ready'); | ||
} | ||
}); | ||
</script> | ||
</dom-module> | ||
<dom-module id="child-element"> | ||
<template> | ||
<grandchild-element></grandchild-element> | ||
<h2>{{person}}</h2> | ||
</template> | ||
<script> | ||
Polymer({ | ||
is: 'child-element', | ||
properties: { | ||
person: { | ||
type: Object | ||
} | ||
}, | ||
ready: function(){ | ||
console.log('child-element ready'); | ||
} | ||
}); | ||
</script> | ||
</dom-module> | ||
<dom-module id="parent-element"> | ||
<template> | ||
<template is="dom-repeat" items="[[childrenData]]"> | ||
<child-element person="[[item]]"></child-element> | ||
</template> | ||
</template> | ||
<script> | ||
Polymer({ | ||
is: 'parent-element', | ||
properties: { | ||
childrenData: { | ||
type: Array, | ||
value: function() { return ["Child name"]} | ||
} | ||
}, | ||
ready: function(){ | ||
console.log('parent-element ready'); | ||
} | ||
}); | ||
</script> | ||
</dom-module> | ||
|
||
|
||
<parent-element></parent-element> | ||
|
||
</body> | ||
</html> |