Angular: Route throws an exception in IE 11 & Safari

Created on 21 Jun 2016  ·  3Comments  ·  Source: angular/angular

I'm submitting a ... (check one with "x")

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Angular 2 rc2 - Routing throws an exception in INTERNET EXPLORER 11 when using the back button more than once

Not only that. Components lifecycle hooks are not called correctly. Duplicate of (#7722)

Expected/desired behavior

It should not throw an exception

Reproduction of the problem

Open plunker provided by official documentation :

1)
https://angular.io/docs/ts/latest/guide/router.html
http://plnkr.co/edit/h0o2IuoZYvXGtC1ejQBl?p=preview

2)
Do some navigation

3)
Press f12(open developer console)

4)
Use back button more than once

This is the result :

Unhandled Promise rejection: EXCEPTION: Error in :0:0
ORIGINAL EXCEPTION: TypeError: Unable to get property 'unsubscribe' of undefined or null reference
ORIGINAL STACKTRACE:
TypeError: Unable to get property 'unsubscribe' of undefined or null reference
at HeroListComponent.prototype.ngOnDestroy (eval code:32:9)
at _View_HeroListComponent_Host0.prototype.destroyInternal (Function code:33:3)
at AppView.prototype.destroyLocal (eval code:11773:13)
at DebugAppView.prototype.destroyLocal (eval code:11935:17)
at AppView.prototype._destroyRecurse (eval code:11761:13)
at AppView.prototype.destroy (eval code:11747:13)
at ComponentRef_.prototype.destroy (eval code:8889:57)
at RouterOutlet.prototype.deactivate (eval code:47:13)
at ActivateRoutes.prototype.deactivateOutletAndItChildren (eval code:381:13)
at ActivateRoutes.prototype.activateRoutes (eval code:363:13)
ERROR CONTEXT:
[object Object] ; Zone: ; Task: Promise.then ; Value: EXCEPTION: Error in :0:0
ORIGINAL EXCEPTION: TypeErro
"Unhandled Promise rejection:"
"EXCEPTION: Error in :0:0

Please tell us about your environment:

  • Angular version: 2.0.0-rc.2
  • Browser: [IE 11]
router bufix

Most helpful comment

Yes, same on Safari

All 3 comments

Yes, same on Safari

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings