<ul class="contains-task-list">
<li><strong>I'm submitting a ...</strong></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> bug report</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> feature request</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> support request =&gt; Please do not submit support request here, see note at the top of this template.</li>
</ul>
<p dir="auto"><strong>Current behavior</strong><br>
If you have base class A, with dependencies specified in its constructor, and then create class B, which subclasses A, and do not specify a constructor, when you try to inject class B into a component, its dependencies are not resolved per its parent constructor. As a workaround, I am duplicating the constructor of A in B.</p>
<p dir="auto"><strong>Expected/desired behavior</strong><br>
Dependencies specified in the parent constructor are resolved.</p>
<ul dir="auto">
<li><strong>What is the motivation / use case for changing the behavior?</strong><br>
Developer ergonomics. This bug fix should be feasible since the entire prototype chain is available from within the decorator (at least in modern browsers): <a href="https://www.typescriptlang.org/play/#src=abstract%20class%20RuntimeErrorHandler%20%7B%0D%0A%09constructor(msg%3A%20string)%20%7B%7D%0D%0A%7D%0D%0A%0D%0Afunction%20test(constructor%3A%20Function)%20%7B%0D%0A%09console.log(constructor.prototype)%3B%0D%0A%7D%0D%0A%0D%0A%40test%0D%0Aclass%20ConsoleErrorHandler%20extends%20RuntimeErrorHandler%20%7B%7D" rel="nofollow">https://www.typescriptlang.org/play/#src=abstract%20class%20RuntimeErrorHandler%20%7B%0D%0A%09constructor(msg%3A%20string)%20%7B%7D%0D%0A%7D%0D%0A%0D%0Afunction%20test(constructor%3A%20Function)%20%7B%0D%0A%09console.log(constructor.prototype)%3B%0D%0A%7D%0D%0A%0D%0A%40test%0D%0Aclass%20ConsoleErrorHandler%20extends%20RuntimeErrorHandler%20%7B%7D</a></li>
<li><strong>Please tell us about your environment:</strong><br>
Node 5.</li>
<li><strong>Angular version:</strong> 2.0.0-beta.X</li>
<li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</li>
<li><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5 | Dart]</li>
</ul>
<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 =&gt; search github for a similar issue or PR before submitting
[ ] 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 =&gt; search github for a similar issue or PR before submitting
[ ] 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><br>
The client has been AOT compiled and bundled using Webpack2. Lazy loading has been implemented using angular-router-loader. Before navigating to a lazy loaded module I force offline mode and then try to navigate. Routing fails, as expected, because it can't load the relevant chunk. The error is 'Loading chunk [chunk number] failed'. After switching back online router no longer works (either by router.navigate or by routerLink directive). Router does not resolve neither reject the navigation command.<br>
The error logged is <code class="notranslate">Error: Uncaught (in promise): Error: Loading chunk 1 failed</code></p>
<p dir="auto"><strong>Expected behavior</strong><br>
The router shouldn't stop working.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
Angular2 client has a feature module, that is lazy loaded.<br>
e.g. <code class="notranslate">{ path: 'lazy', loadChildren: './+lazy/lazy.module#LazyModule' }</code><br>
webpack is configured appropriately:<br>
<code class="notranslate">{ test: /\.ts$/, loaders: [ 'awesome-typescript-loader', 'angular2-template-loader', 'angular-router-loader?aot=true'  ], }</code><br>
Before navigating to the lazy module switch to Offline (e.g. by using Chrome developer tools). Then switch back Online and try to navigate with the router again.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
The app should be fully functional when the connection is restored, the user should not be forced to reload the app.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
Working on Windows 10, Visual studio 2015, Asp.net core</p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Angular version:</strong><br>
Has been reproduced in 2.2.4 &amp; 2.3.1</p>
</li>
<li>
<p dir="auto"><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]<br>
Tested only on Chrome 54</p>
</li>
<li>
<p dir="auto"><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]<br>
Typescript 2.0.10</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =<br>
node 5.6.0</p>
</li>
</ul>