@@ -107,6 +107,7 @@ class NgRepeatDirective extends AbstractNgRepeatDirective {
107
107
* digest cycle and will not update on changes to the model.
108
108
*
109
109
*/
110
+ @deprecated
110
111
@NgDirective (
111
112
children: NgAnnotation .TRANSCLUDE_CHILDREN ,
112
113
selector: '[ng-shallow-repeat]' ,
@@ -120,7 +121,7 @@ class NgShallowRepeatDirective extends AbstractNgRepeatDirective {
120
121
AstParser astParser)
121
122
: super (blockHole, boundBlockFactory, scope, parser, astParser)
122
123
{
123
- print ('DEPRICATED : [ng-shallow-repeat] use [ng-repeat]' );
124
+ print ('DEPRECATED : [ng-shallow-repeat] use [ng-repeat]' );
124
125
}
125
126
}
126
127
@@ -218,7 +219,7 @@ abstract class AbstractNgRepeatDirective {
218
219
}
219
220
}
220
221
// remove existing items
221
- _rows.forEach ((key, row){
222
+ _rows.forEach ((key, row) {
222
223
row.block.remove ();
223
224
row.scope.destroy ();
224
225
});
@@ -236,7 +237,7 @@ abstract class AbstractNgRepeatDirective {
236
237
237
238
List <_Row > newRowOrder = _computeNewRows (collection, trackById);
238
239
239
- for (var index = 0 , length = collection.length ; index < length; index++ ) {
240
+ for (var index = 0 ; index < collection. length; index++ ) {
240
241
var value = collection.elementAt (index);
241
242
_Row row = newRowOrder[index];
242
243
@@ -263,14 +264,14 @@ abstract class AbstractNgRepeatDirective {
263
264
childContext[_valueIdentifier] = value;
264
265
}
265
266
var first = (index == 0 );
266
- var last = (index == ( length - 1 ) );
267
+ var last = (index == collection. length - 1 );
267
268
childContext
268
- ..[r'$index' ] = index
269
- ..[r'$first' ] = (index == 0 )
270
- ..[r'$last' ] = (index == (length - 1 ))
271
- ..[r'$middle' ] = ! first && ! last
272
- ..[r'$odd' ] = index & 1 == 1
273
- ..[r'$even' ] = index & 1 == 0 ;
269
+ ..[r'$index' ] = index
270
+ ..[r'$first' ] = first
271
+ ..[r'$last' ] = last
272
+ ..[r'$middle' ] = ! first && ! last
273
+ ..[r'$odd' ] = index & 1 == 1
274
+ ..[r'$even' ] = index & 1 == 0 ;
274
275
275
276
if (row.startNode == null ) {
276
277
var block = _boundBlockFactory (childScope);
0 commit comments