aimprogman
aimprogman

Reputation: 294

Angular2 does not load (error)

I dont understand,what is the error, because i dont edit my code,before that everything worked. The compiler successfully compiles. I use Angular cli. Does not show the page, show only Loading..., but in console error enter image description here Uncaught TypeError: Cannot read property 'apply' of undefined

I cant find any resource to solve this problem. I cleared my browser's cache.I looked all the codes like everything is OK.

Upvotes: 0

Views: 113

Answers (1)

Parth Ghiya
Parth Ghiya

Reputation: 6949

There seems change in either Angular CLI Version/ NPM / Node JS.

Any of the following things should work. https://github.com/angular/angular-cli/issues/4632

  1. Upgrade Angular CLI, remove node_modules, install those again.
  2. Upgrade NPM and node JS
  3. Upgrade Chrome Browser as per gitHub issue Link.

Last thing you can do is. use intl polyfill.

npm i mdn-polyfills --save

To use this

import 'mdn-polyfills/Object.assign'

Upvotes: 2

Related Questions