{"action":"closed","issue":{"url":"https://api.github.com/repos/dart-lang/angular/issues/1354","repository_url":"https://api.github.com/repos/dart-lang/angular","labels_url":"https://api.github.com/repos/dart-lang/angular/issues/1354/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/angular/issues/1354/comments","events_url":"https://api.github.com/repos/dart-lang/angular/issues/1354/events","html_url":"https://github.com/dart-lang/angular/issues/1354","id":327924294,"node_id":"MDU6SXNzdWUzMjc5MjQyOTQ=","number":1354,"title":"Error during change detection while routing crashes app","user":{"login":"matanlurey","id":168174,"node_id":"MDQ6VXNlcjE2ODE3NA==","avatar_url":"https://avatars2.githubusercontent.com/u/168174?v=4","gravatar_id":"","url":"https://api.github.com/users/matanlurey","html_url":"https://github.com/matanlurey","followers_url":"https://api.github.com/users/matanlurey/followers","following_url":"https://api.github.com/users/matanlurey/following{/other_user}","gists_url":"https://api.github.com/users/matanlurey/gists{/gist_id}","starred_url":"https://api.github.com/users/matanlurey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matanlurey/subscriptions","organizations_url":"https://api.github.com/users/matanlurey/orgs","repos_url":"https://api.github.com/users/matanlurey/repos","events_url":"https://api.github.com/users/matanlurey/events{/privacy}","received_events_url":"https://api.github.com/users/matanlurey/received_events","type":"User","site_admin":false},"labels":[{"id":649961049,"node_id":"MDU6TGFiZWw2NDk5NjEwNDk=","url":"https://api.github.com/repos/dart-lang/angular/labels/area:%20router","name":"area: router","color":"fad8c7","default":false},{"id":623412944,"node_id":"MDU6TGFiZWw2MjM0MTI5NDQ=","url":"https://api.github.com/repos/dart-lang/angular/labels/%E2%98%84%20problem:%20bug","name":"☄ problem: bug","color":"e99695","default":false},{"id":877566958,"node_id":"MDU6TGFiZWw4Nzc1NjY5NTg=","url":"https://api.github.com/repos/dart-lang/angular/labels/%E2%9B%88%20experience:%20release","name":"⛈ experience: release","color":"b0d633","default":false}],"state":"closed","locked":false,"assignee":{"login":"matanlurey","id":168174,"node_id":"MDQ6VXNlcjE2ODE3NA==","avatar_url":"https://avatars2.githubusercontent.com/u/168174?v=4","gravatar_id":"","url":"https://api.github.com/users/matanlurey","html_url":"https://github.com/matanlurey","followers_url":"https://api.github.com/users/matanlurey/followers","following_url":"https://api.github.com/users/matanlurey/following{/other_user}","gists_url":"https://api.github.com/users/matanlurey/gists{/gist_id}","starred_url":"https://api.github.com/users/matanlurey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matanlurey/subscriptions","organizations_url":"https://api.github.com/users/matanlurey/orgs","repos_url":"https://api.github.com/users/matanlurey/repos","events_url":"https://api.github.com/users/matanlurey/events{/privacy}","received_events_url":"https://api.github.com/users/matanlurey/received_events","type":"User","site_admin":false},"assignees":[{"login":"matanlurey","id":168174,"node_id":"MDQ6VXNlcjE2ODE3NA==","avatar_url":"https://avatars2.githubusercontent.com/u/168174?v=4","gravatar_id":"","url":"https://api.github.com/users/matanlurey","html_url":"https://github.com/matanlurey","followers_url":"https://api.github.com/users/matanlurey/followers","following_url":"https://api.github.com/users/matanlurey/following{/other_user}","gists_url":"https://api.github.com/users/matanlurey/gists{/gist_id}","starred_url":"https://api.github.com/users/matanlurey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matanlurey/subscriptions","organizations_url":"https://api.github.com/users/matanlurey/orgs","repos_url":"https://api.github.com/users/matanlurey/repos","events_url":"https://api.github.com/users/matanlurey/events{/privacy}","received_events_url":"https://api.github.com/users/matanlurey/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-05-30T22:38:27Z","updated_at":"2018-06-01T22:44:40Z","closed_at":"2018-06-01T22:44:40Z","author_association":"CONTRIBUTOR","body":"It's possible, likely due to (a) the semantics of the router and (b) the manual use of `.detectChanges()`, to get into an infinite exception loop that will crash/hang the browser. Basically, if a routed-to component has a getter, in its template, that throws, the component will never be set to `ChangeDetectorState.Errored` _and_ it will continuously be created over and over.\r\n\r\nHere is the starting point for a test case I am writing to catch and iterate on a solution:\r\n\r\n```dart\r\n@TestOn('browser')\r\nimport 'package:angular/angular.dart';\r\nimport 'package:angular_router/angular_router.dart';\r\nimport 'package:angular_router/testing.dart';\r\nimport 'package:test/test.dart';\r\n\r\nimport '1354_infinite_exceptions_test.template.dart' as ng;\r\n\r\nvoid main() {\r\n  test('should ...', () {\r\n    runApp(ng.AppComponentNgFactory);\r\n  });\r\n}\r\n\r\n@Component(\r\n  selector: 'app',\r\n  template: r'''\r\n    Sample Application\r\n\r\n    <router-outlet [routes]=\"routes\"></router-outlet>\r\n  ''',\r\n  directives: const [\r\n    RouterOutlet,\r\n  ],\r\n  providers: const [\r\n    routerProvidersTest,\r\n  ],\r\n)\r\nclass AppComponent {\r\n  static final routes = [\r\n    new RouteDefinition(\r\n      path: 'view',\r\n      component: ng.ViewComponentNgFactory,\r\n    ),\r\n  ];\r\n\r\n  final MockLocationStrategy locationStrategy;\r\n\r\n  AppComponent(@Inject(LocationStrategy) this.locationStrategy);\r\n}\r\n\r\n@Component(\r\n  selector: 'view',\r\n  template: 'Hello World',\r\n)\r\nclass ViewComponent {}\r\n```"}}
{"actor":{"display_login":"alorenzen"}}