File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1382,7 +1382,7 @@ Elements in a template can be automatically repeated and bound to array items us
1382
1382
<div > Employee list: </div >
1383
1383
<template is =" x-repeat" items =" {{employees}}" >
1384
1384
<div >First name: <span >{{item.first}}</span ></div >
1385
- <div >Last name: <span >{{itemlast }}</span ></div >
1385
+ <div >Last name: <span >{{item.last }}</span ></div >
1386
1386
</template >
1387
1387
1388
1388
</template >
Original file line number Diff line number Diff line change 27
27
<div> Employee list: </div>
28
28
<template is="x-repeat" id="employeeList" items="{{employees}}">
29
29
<div>First name: <span>{{item.first}}</span></div>
30
- <div>Last name: <span>{{itemlast }}</span></div>
30
+ <div>Last name: <span>{{item.last }}</span></div>
31
31
<button on-click="toggleSelection">Select</button>
32
32
</template>
33
33
36
36
<div> Selected employees: </div>
37
37
<template is="x-repeat" items="{{selected}}">
38
38
<div>First name: <span>{{item.first}}</span></div>
39
- <div>Last name: <span>{{itemlast }}</span></div>
39
+ <div>Last name: <span>{{item.last }}</span></div>
40
40
</template>
41
41
42
42
</template>
124
124
} ,
125
125
126
126
/**
127
- * Selects the given item. When `toggle` is true, this will automatically
128
- * deselect the item if already selected.
127
+ * Deselects the given item if it is already selected.
129
128
*/
130
129
deselect : function ( item ) {
131
130
if ( this . multi ) {
146
145
} ,
147
146
148
147
/**
149
- * Deselects the given item if it is already selected.
148
+ * Selects the given item. When `toggle` is true, this will automatically
149
+ * deselect the item if already selected.
150
150
*/
151
151
select : function ( item ) {
152
152
var key = this . itemsCollection . getKey ( item ) ;
Original file line number Diff line number Diff line change 29
29
<div> Employee list: </div>
30
30
<template is="x-repeat" items="{{employees}}">
31
31
<div>First name: <span>{{item.first}}</span></div>
32
- <div>Last name: <span>{{itemlast }}</span></div>
32
+ <div>Last name: <span>{{item.last }}</span></div>
33
33
</template>
34
34
35
35
</template>
You can’t perform that action at this time.
0 commit comments