Z
Z
zeuss562017-07-04 17:00:47
Angular
zeuss56, 2017-07-04 17:00:47

How to fix Angular 2 bug (somewhere in WebPack) in conjunction with Cordova?

Environment:

> node -v
v6.11.0
> npm -v
3.10.10
> ng -v
@angular/cli: 1.1.2
os: win32 x64
> cordova -v
7.0.1

Path to reproduce the error:
> ng new App
> cd App
> cordova create cordova com.mycompany.app App
> ng build --output-path=cordova/www/ --base-href .
> cd cordova
> cordova platform add android
> cordova run android

On the device / emulator screen (the first in my case), the application opens and a white screen.
Going to chrome://inspect/#devicessee the error "Uncaught TypeError: Cannot call method 'apply' of undefined in vendor.bundle.js:5706":
76d58bb4c025457da3d676eda8018e0a.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zeuss56, 2017-07-10
@zeuss56

src/polyfills.tsUncomment the line import 'core-js/es6/object';.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question