Closed adam-singer closed 10 years ago
Check out step_11/partials/phone-list.html in the branch https://github.com/financeCoding/angular-dart-phonecat/commits/comments-in-partials-head-break-angular
step_11/partials/phone-list.html
Adding a comment node into the beginning of the partial view kills the angular application. If the comment is removed then everything functions as expected. I've also noticed some other odd parsing oddities which I'll try and reproduce.
listen ignoreClick=false route [Route: null] listen on win newHandle for [Route: null] type 'InputElement' is not a subtype of type 'SelectElement' of '_selectElement@0x1c4dc3a7'. STACKTRACE: #0 InputSelectDirective.InputSelectDirective (package:angular/directive/input_select.dart:38:41) #1 _LocalClassMirror._invokeConstructor (dart:mirrors-patch/mirrors_impl.dart:873) #2 _LocalClassMirror.newInstance (dart:mirrors-patch/mirrors_impl.dart:789) #3 DynamicInjector.newInstanceOf (package:di/dynamic_injector.dart:64:35) #4 _TypeProvider.get (package:di/module.dart:151:29) #5 Injector._getInstanceByKey (package:di/injector.dart:116:27) #6 Injector._getInstanceByKey (package:di/injector.dart:120:7) #7 Injector.get (package:di/injector.dart:170:24) #8 ElementBinder.bind.<anonymous closure> (package:angular/core_dom/element_binder.dart:206:42) #9 ElementBinder.bind.<anonymous closure> (package:angular/core_dom/element_binder.dart:257:9) #10 ElementBinder.bind.<anonymous closure> (package:angular/core_dom/element_binder.dart:257:9) #11 List.forEach (dart:core-patch/growable_array.dart:240) #12 ElementBinder.bind (package:angular/core_dom/element_binder.dart:201:26) #13 TaggingViewFactory._bindTagged (package:angular/core_dom/tagging_view_factory.dart:34:51) #14 TaggingViewFactory._link (package:angular/core_dom/tagging_view_factory.dart:70:22) #15 TaggingViewFactory.call (package:angular/core_dom/tagging_view_factory.dart:22:12) #16 TaggingViewFactory.call (package:angular/core_dom/tagging_view_factory.dart:24:7) #17 TaggingViewFactory.call (package:angular/core_dom/tagging_view_factory.dart:24:7) #18 NgViewDirective._show.<anonymous closure> (package:angular/routing/ng_view.dart:120:26) #19 _rootRunUnary (dart:async/zone.dart:730) #20 _ZoneDelegate.runUnary (dart:async/zone.dart:462) #21 _onRunUnary.<anonymous closure> (package:angular/core/zone.dart:70:61) #22 NgZone._onRunBase (package:angular/core/zone.dart:54:16) #23 _onRunUnary (package:angular/core/zone.dart:70:15) #24 _ZoneDelegate.runUnary (dart:async/zone.dart:462) #25 _CustomizedZone.runUnary (dart:async/zone.dart:667) #26 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:488) #27 _Future._propagateToListeners (dart:async/future_impl.dart:571) #28 _Future._completeWithValue (dart:async/future_impl.dart:331) #29 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:393) #30 _rootRun (dart:async/zone.dart:719) #31 _ZoneDelegate.run (dart:async/zone.dart:453) #32 _onScheduleMicrotask.<anonymous closure> (package:angular/core/zone.dart:74:39) #33 _rootRun (dart:async/zone.dart:723) #34 _ZoneDelegate.run (dart:async/zone.dart:453) #35 NgZone._finishTurn (package:angular/core/zone.dart:94:23) #36 NgZone._onRunBase (package:angular/core/zone.dart:61:43) #37 _onRunUnary (package:angular/core/zone.dart:70:15) #38 _ZoneDelegate.runUnary (dart:async/zone.dart:462) #39 _CustomizedZone.runUnary (dart:async/zone.dart:667) #40 _BaseZone.runUnaryGuarded (dart:async/zone.dart:582) #41 _BaseZone.bindUnaryCallback.<anonymous closure> (dart:async/zone.dart:608) Class 'DivElement' has no instance getter 'value'. NoSuchMethodError: method not found: 'value' Receiver: Instance of 'DivElement' Arguments: [] STACKTRACE: #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:45) #1 InputTextLikeDirective.typedValue (package:angular/directive/ng_model.dart:291:47) #2 InputTextLikeDirective.InputTextLikeDirective.<anonymous closure>.<anonymous closure> (package:angular/directive/ng_model.dart:301:28) #3 RootScope.flush (package:angular/core/scope.dart:520:29) #4 apply (package:angular/core/scope.dart:262:18) #5 _rootRun (dart:async/zone.dart:723) #6 _ZoneDelegate.run (dart:async/zone.dart:453) #7 NgZone._finishTurn (package:angular/core/zone.dart:96:21) #8 NgZone._onRunBase (package:angular/core/zone.dart:61:43) #9 _onRunUnary (package:angular/core/zone.dart:70:15) #10 _ZoneDelegate.runUnary (dart:async/zone.dart:462) #11 _CustomizedZone.runUnary (dart:async/zone.dart:667) #12 _BaseZone.runUnaryGuarded (dart:async/zone.dart:582) #13 _BaseZone.bindUnaryCallback.<anonymous closure> (dart:async/zone.dart:608) Class 'DivElement' has no instance getter 'value'. NoSuchMethodError: method not found: 'value' Receiver: Instance of 'DivElement' Arguments: [] STACKTRACE: #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:45) #1 InputTextLikeDirective.typedValue (package:angular/directive/ng_model.dart:291:47) #2 InputTextLikeDirective.InputTextLikeDirective.<anonymous closure>.<anonymous closure> (package:angular/directive/ng_model.dart:301:28) #3 RootScope.flush (package:angular/core/scope.dart:520:29) #4 apply (package:angular/core/scope.dart:262:18) #5 _rootRun (dart:async/zone.dart:723) #6 _ZoneDelegate.run (dart:async/zone.dart:453) #7 NgZone._finishTurn (package:angular/core/zone.dart:96:21) #8 NgZone._onRunBase (package:angular/core/zone.dart:61:43) #9 _onRunUnary (package:angular/core/zone.dart:70:15) #10 _ZoneDelegate.runUnary (dart:async/zone.dart:462) #11 _CustomizedZone.runUnary (dart:async/zone.dart:667) #12 _BaseZone.runUnaryGuarded (dart:async/zone.dart:582) #13 _BaseZone.bindUnaryCallback.<anonymous closure> (dart:async/zone.dart:608)
This has been fixed in the latest release (0.9.11), see the linked PR.
Thanks @vicb
Check out
step_11/partials/phone-list.html
in the branch https://github.com/financeCoding/angular-dart-phonecat/commits/comments-in-partials-head-break-angularAdding a comment node into the beginning of the partial view kills the angular application. If the comment is removed then everything functions as expected. I've also noticed some other odd parsing oddities which I'll try and reproduce.