导航深层嵌套路由会产生错误 - 'package:angular / core / scope.dart':失败断言...'isAttached'不为真(angulardart 0.9.10)

时间:2014-04-11 20:58:14

标签: navigation dart url-routing angular-dart

当我从最深的视图导航到下一个父视图时,我收到以下错误消息:'package:angular/core/scope.dart': Failed assertion: line 297 pos 12: 'isAttached' is not true.

Click here to view the implementation source code

上述错误是什么意思?我的路由器定义是否有任何错误?可能是<ng-view></ng-view>在深层嵌套视图中的位置吗?

如何重现此错误条件:

  1. 导航到最深的路线,即一直到子视图之一,如屏幕截图所示[1] [https://onedrive.live.com/embed?cid=CCCEB2154F3BF15A&resid= !CCCEB2154F3BF15A 869&安培; AUTHKEY = AJQ-1hF_KUVNsYM]

  2. 现在,尝试导航到View2(即到下一个父视图),如屏幕截图-2所示[https://onedrive.live.com/embed?cid=CCCEB2154F3BF15A&resid=CCCEB2154F3BF15A !868&安培; AUTHKEY = AEZyo3s7A-el880]

  3. 以上两个步骤应该产生以下错误转储:

    'package:angular/core/scope.dart': Failed assertion: line 297 pos 12: 'isAttached' is not true.
    
    STACKTRACE:
    #0      Scope.destroy (package:angular/core/scope.dart:297:12)
    #1      NgViewDirective._cleanUp (package:angular/routing/ng_view.dart:132:19)
    #2      NgViewDirective._show.<anonymous closure> (package:angular/routing/ng_view.dart:108:15)
    #3      _rootRunUnary (dart:async/zone.dart:717)
    #4      _ZoneDelegate.runUnary (dart:async/zone.dart:449)
    #5      _onRunUnary.<anonymous closure> (package:angular/core/zone.dart:70:61)
    #6      NgZone._onRunBase (package:angular/core/zone.dart:54:16)
    #7      _onRunUnary (package:angular/core/zone.dart:70:15)
    #8      _ZoneDelegate.runUnary (dart:async/zone.dart:449)
    #9      _CustomizedZone.runUnary (dart:async/zone.dart:654)
    #10     _BaseZone.runUnaryGuarded (dart:async/zone.dart:569)
    #11     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:333)
    #12     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263)
    #13     _SyncBroadcastStreamController._sendData.<anonymous closure> (dart:async/broadcast_stream_controller.dart:345)
    #14     _BroadcastStreamController._forEachListener (dart:async/broadcast_stream_controller.dart:298)
    #15     _SyncBroadcastStreamController._sendData (dart:async/broadcast_stream_controller.dart:344)
    #16     _BroadcastStreamController.add (dart:async/broadcast_stream_controller.dart:228)
    #17     Router._leaveCurrentRouteHelper (package:route_hierarchical/client.dart:630:48)
    #18     Router._leaveCurrentRouteHelper (package:route_hierarchical/client.dart:632:46)
    #19     Router._leaveCurrentRoute (package:route_hierarchical/client.dart:621:43)
    #20     Router._leaveOldRoutes (package:route_hierarchical/client.dart:504:30)
    #21     Router._processNewRoute (package:route_hierarchical/client.dart:484:27)
    #22     Router._route.<anonymous closure> (package:route_hierarchical/client.dart:468:29)
    #23     _rootRunUnary (dart:async/zone.dart:717)
    #24     _ZoneDelegate.runUnary (dart:async/zone.dart:449)
    #25     _onRunUnary.<anonymous closure> (package:angular/core/zone.dart:70:61)
    #26     NgZone._onRunBase (package:angular/core/zone.dart:54:16)
    #27     _onRunUnary (package:angular/core/zone.dart:70:15)
    #28     _ZoneDelegate.runUnary (dart:async/zone.dart:449)
    #29     _CustomizedZone.runUnary (dart:async/zone.dart:654)
    #30     _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:439)
    #31     _Future._propagateToListeners (dart:async/future_impl.dart:522)
    #32     _Future._complete (dart:async/future_impl.dart:303)
    #33     _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:354)
    #34     _rootRun (dart:async/zone.dart:706)
    #35     _ZoneDelegate.run (dart:async/zone.dart:440)
    #36     _onScheduleMicrotask.<anonymous closure> (package:angular/core/zone.dart:74:39)
    #37     _rootRun (dart:async/zone.dart:710)
    #38     _ZoneDelegate.run (dart:async/zone.dart:440)
    #39     NgZone._finishTurn (package:angular/core/zone.dart:94:23)
    #40     NgZone._onRunBase (package:angular/core/zone.dart:61:43)
    #41     _onRunUnary (package:angular/core/zone.dart:70:15)
    #42     _ZoneDelegate.runUnary (dart:async/zone.dart:449)
    #43     _CustomizedZone.runUnary (dart:async/zone.dart:654)
    #44     _BaseZone.runUnaryGuarded (dart:async/zone.dart:569)
    #45     _BaseZone.bindUnaryCallback.<anonymous closure> (dart:async/zone.dart:595)
    

    其他信息

    飞镖版:

    Dart Editor version 1.2.0.release (STABLE)
    Dart SDK version 1.2.0
    

    开发机器:

    Manjaro Linux 0.8.9 64-bit
    Linux kernel 3.10.36-1-MANJARO
    (Note! Manjaro Linux is an Arch Linux based distro)
    

1 个答案:

答案 0 :(得分:0)

看起来假期顺序中有一个错误: https://github.com/angular/route.dart/pull/43

等待确认。