Skip to content

Commit 1ba3fa2

Browse files
Use class syntax in <dom-repeat> documentation (Polymer#5077)
1 parent 78558b8 commit 1ba3fa2

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

lib/elements/dom-repeat.html

+17-11
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,22 @@
5151
* </template>
5252
*
5353
* <script>
54-
* Polymer({
55-
* is: 'employee-list',
56-
* ready: function() {
57-
* this.employees = [
58-
* {first: 'Bob', last: 'Smith'},
59-
* {first: 'Sally', last: 'Johnson'},
60-
* ...
61-
* ];
54+
* class EmployeeList extends Polymer.Element {
55+
* static get is() { return 'employee-list'; }
56+
* static get properties() {
57+
* return {
58+
* employees: {
59+
* value() {
60+
* return [
61+
* {first: 'Bob', last: 'Smith'},
62+
* {first: 'Sally', last: 'Johnson'},
63+
* ...
64+
* ];
65+
* }
66+
* }
67+
* };
6268
* }
63-
* });
69+
* }
6470
* < /script>
6571
*
6672
* </dom-module>
@@ -102,8 +108,8 @@
102108
* For example, for an `dom-repeat` with a filter of the following:
103109
*
104110
* ```js
105-
* isEngineer: function(item) {
106-
* return item.type == 'engineer' || item.manager.type == 'engineer';
111+
* isEngineer(item) {
112+
* return item.type == 'engineer' || item.manager.type == 'engineer';
107113
* }
108114
* ```
109115
*

0 commit comments

Comments
 (0)