This repository was archived by the owner on Feb 22, 2018. It is now read-only.
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
Using ng-repeat track by fails with No "getter for $index" when using transformer #1307
Open
Description
Using track by $index fails with a "no getter" exception when using the angular transformer.
Issue 1023 seems related.
No getter for '$index'.
STACKTRACE:
Error
at dart.wrapException (http://localhost:8080/main.dart.js:2506:15)
at StaticClosureMap.lookupGetter$1 (http://localhost:8080/main.dart.js:10686:17)
at DynamicParserBackend.newAccessScope$1 (http://localhost:8080/main.dart.js:8926:21)
at DynamicParserImpl.parseAccessOrCallScope$0 (http://localhost:8080/main.dart.js:9280:29)
at DynamicParserImpl.parsePrimary$0 (http://localhost:8080/main.dart.js:9256:21)
at DynamicParserImpl.parseAccessOrCallMember$0 (http://localhost:8080/main.dart.js:9213:21)
at DynamicParserImpl.parsePrefix$0 (http://localhost:8080/main.dart.js:9209:21)
at DynamicParserImpl.parseMultiplicative$0 (http://localhost:8080/main.dart.js:9188:21)
at DynamicParserImpl.parseAdditive$0 (http://localhost:8080/main.dart.js:9177:21)
at DynamicParserImpl.parseRelational$0 (http://localhost:8080/main.dart.js:9162:21)
index.html
<!DOCTYPE html>
<html ng-app>
<body>
<span ng-repeat="item in [1,1,1] track by $index">{{item}}</span>
<script type="application/dart" src="main.dart"></script>
<script type="text/javascript" src="packages/browser/dart.js"></script>
</body>
</html>
main.dart
import 'package:angular/angular.dart';
import 'package:angular/application_factory.dart';
void main() { applicationFactory()
.run();
}
pubspec.yaml
name: test
version: 0.0.1
dependencies:
angular: 0.13.0
browser: any
transformers:
- angular:
html_files:
- web/index.html