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.
Watching inside a watched collection triggers a stacktrace #1046
Closed
Description
This doesn't cause any application level bugs but you will see stack traces in the DevTools console. This bug is easier explained with an example.
HTML
<button ng-click="items.length > 0 && items.removeLast()">Remove Item</button><br>
<div ng-repeat="i in items"><input ng-model="items[$index]"></div>
Start with scope.context['items'] = ["A"]
and click Remove Item
once. You'll see a stacktrace in Dartium's DevTools Console for a range error.
STACKTRACE
RangeError: 0
STACKTRACE:
#0 List.[] (dart:core-patch/growable_array.dart:168)
#1 _operation_bracket (package:angular/core/scope.dart:1235:57)
#2 Function.apply (dart:core-patch/function_patch.dart:28)
#3 _EvalWatchRecord.check (package:angular/change_detection/watch_group.dart:809:31)
#4 RootWatchGroup.detectChanges (package:angular/change_detection/watch_group.dart:425:29)
#5 RootScope.digest (package:angular/core/scope.dart:656:45)
#6 apply (package:angular/core/scope.dart:268:24)
#7 _rootRun (dart:async/zone.dart:723)
#8 _ZoneDelegate.run (dart:async/zone.dart:453)
#9 VmTurnZone._finishTurn (package:angular/core/zone.dart:150:21)
#10 VmTurnZone._onRunBase (package:angular/core/zone.dart:105:43)
#11 _onRunUnary (package:angular/core/zone.dart:114:17)
#12 _ZoneDelegate.runUnary (dart:async/zone.dart:462)
#13 _CustomizedZone.runUnary (dart:async/zone.dart:667)
#14 _BaseZone.runUnaryGuarded (dart:async/zone.dart:582)
#15 _BaseZone.bindUnaryCallback.<anonymous closure> (dart:async/zone.dart:608)