Skip to content

Commit

Permalink
Use class syntax in <dom-repeat> documentation (Polymer#5077)
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorBreakfast authored Feb 1, 2018
1 parent 78558b8 commit 1e6b5c7
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions lib/elements/dom-repeat.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,22 @@
* </template>
*
* <script>
* Polymer({
* is: 'employee-list',
* ready: function() {
* this.employees = [
* {first: 'Bob', last: 'Smith'},
* {first: 'Sally', last: 'Johnson'},
* ...
* ];
* class EmployeeList extends Polymer.Element {
* static get is() { return 'employee-list'; }
* static get properties() {
* return {
* employees: {
* value() {
* return [
* {first: 'Bob', last: 'Smith'},
* {first: 'Sally', last: 'Johnson'},
* ...
* ];
* }
* }
* };
* }
* });
* }
* < /script>
*
* </dom-module>
Expand Down Expand Up @@ -102,7 +108,7 @@
* For example, for an `dom-repeat` with a filter of the following:
*
* ```js
* isEngineer: function(item) {
* isEngineer(item) {
* return item.type == 'engineer' || item.manager.type == 'engineer';
* }
* ```
Expand Down

0 comments on commit 1e6b5c7

Please sign in to comment.