title: Angular 6 TypeError: Cannot read property 'call' of undefined
body: <p>I am trying to migrate the angular app from 5 to 6 version.
  The app is running well but if I do some changes in my code
  after page reloading, I am facing a weird error:</p>
  
  <pre><code>core.js:1598 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'call' of undefined
  TypeError: Cannot read property 'call' of undefined
      at __webpack_require__ (bootstrap:81)
      at Object../src/app/secure/dashboard/member-index/member-index.module.ngfactory.js (member-index.component.ts:33)
      at __webpack_require__ (bootstrap:81)
      at $_lazy_route_resource lazy namespace object:56
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
      at Object.onInvoke (core.js:4062)
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:387)
      at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:138)
      at zone.js:872
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
      at __webpack_require__ (bootstrap:81)
      at Object../src/app/secure/dashboard/member-index/member-index.module.ngfactory.js (member-index.component.ts:33)
      at __webpack_require__ (bootstrap:81)
      at $_lazy_route_resource lazy namespace object:56
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
      at Object.onInvoke (core.js:4062)
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:387)
      at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:138)
      at zone.js:872
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
      at resolvePromise (zone.js:814)
      at resolvePromise (zone.js:771)
      at zone.js:873
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
      at Object.onInvokeTask (core.js:4053)
      at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
      at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
      at drainMicroTaskQueue (zone.js:595)
  </code></pre>
  
  <p>Did someone face this error? Why this error appears after code changing?</p>
  
  <p><strong>UPD</strong></p>
  
  <p>I was using <code>ng serve --aol</code> to run my app.
  If I use <code>ng serve</code> the error disappears</p>