<p dir="auto"><strong>I'm submitting a ...</strong>  (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong></p>
<p dir="auto">Angular 2 rc2 - Routing throws an exception in INTERNET EXPLORER 11 when using the back button more than once</p>
<p dir="auto">Not only that. Components lifecycle hooks are not called correctly. Duplicate of (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="142695415" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/7722" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/7722/hovercard" href="https://github.com/angular/angular/issues/7722">#7722</a>)</p>
<p dir="auto"><strong>Expected/desired behavior</strong></p>
<p dir="auto">It should not throw an exception</p>
<p dir="auto"><strong>Reproduction of the problem</strong></p>
<p dir="auto">Open plunker provided by official documentation :</p>
<ol dir="auto">
<li></li>
</ol>
<p dir="auto"><a href="https://angular.io/docs/ts/latest/guide/router.html" rel="nofollow">https://angular.io/docs/ts/latest/guide/router.html</a><br>
<a href="http://plnkr.co/edit/h0o2IuoZYvXGtC1ejQBl?p=preview" rel="nofollow">http://plnkr.co/edit/h0o2IuoZYvXGtC1ejQBl?p=preview</a></p>
<ol start="2" dir="auto">
<li></li>
</ol>
<p dir="auto">Do some navigation</p>
<ol start="3" dir="auto">
<li></li>
</ol>
<p dir="auto">Press f12(open developer console)</p>
<ol start="4" dir="auto">
<li></li>
</ol>
<p dir="auto">Use back button more than once</p>
<p dir="auto">This is the result :</p>
<blockquote>
<p dir="auto">Unhandled Promise rejection: EXCEPTION: Error in :0:0<br>
ORIGINAL EXCEPTION: TypeError: Unable to get property 'unsubscribe' of undefined or null reference<br>
ORIGINAL STACKTRACE:<br>
TypeError: Unable to get property 'unsubscribe' of undefined or null reference<br>
at HeroListComponent.prototype.ngOnDestroy (eval code:32:9)<br>
at _View_HeroListComponent_Host0.prototype.destroyInternal (Function code:33:3)<br>
at AppView.prototype.destroyLocal (eval code:11773:13)<br>
at DebugAppView.prototype.destroyLocal (eval code:11935:17)<br>
at AppView.prototype.<em>destroyRecurse (eval code:11761:13)<br>
at AppView.prototype.destroy (eval code:11747:13)<br>
at ComponentRef</em>.prototype.destroy (eval code:8889:57)<br>
at RouterOutlet.prototype.deactivate (eval code:47:13)<br>
at ActivateRoutes.prototype.deactivateOutletAndItChildren (eval code:381:13)<br>
at ActivateRoutes.prototype.activateRoutes (eval code:363:13)<br>
ERROR CONTEXT:<br>
[object Object] ; Zone:  ; Task: Promise.then ; Value: EXCEPTION: Error in :0:0<br>
ORIGINAL EXCEPTION: TypeErro<br>
"Unhandled Promise rejection:"<br>
"EXCEPTION: Error in :0:0</p>
</blockquote>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.0-rc.2</li>
<li><strong>Browser:</strong> [IE 11]</li>
</ul>
<p dir="auto">I'm submitting a clarification. It might be a feature request:</p>
<p dir="auto">Scenario:<br>
I have a popup in my application which does not belongs to any route. What I need to ensure is, while the popup is open, when user clicks on a navigation (which takes to a component route), before activating this route, I need to close the popup. This popup when closing gives user a prompt to close or not close. Now in case user chooses to not close, the route should not change.</p>
<p dir="auto">Is there a way I can provide $canDeactivate hook at the rootRouter level which is executed at each route change along with component specific $canDeactivate hooks?</p>
<p dir="auto">Thanks,<br>
Pranav Kaushik</p>