I have an angular-cli project. I have also added pace. I added it inside the header in index.html <script src="assets/lib/pace/pace.min.js"></script>. It works correctly in chrome, but in IE-11 I get the following error:
ERROR TypeError: Invalid calling object
stack: "TypeError: Invalid calling object
at scheduleTask (http://localhost:4200/polyfills.bundle.js:8607:13)
at ZoneDelegate.prototype.scheduleTask (http://localhost:4200/polyfills.bundle.js:6279:21)
at DELEGATE_ZS.onScheduleTask (http://localhost:4200/polyfills.bundle.js:6169:13)
at ZoneDelegate.prototype.scheduleTask (http://localhost:4200/polyfills.bundle.js:6273:17)
at Zone.prototype.scheduleTask (http://localhost:4200/polyfills.bundle.js:6104:17)
at Zone.prototype.scheduleMacroTask (http://localhost:4200/polyfills.bundle.js:6127:13)
at Anonymous function (http://localhost:4200/polyfills.bundle.js:8637:17)
at proto[name] (http://localhost:4200/polyfills.bundle.js:7142:17)
at Anonymous function (http://localhost:4200/vendor.bundle.js:63666:13)
at Observable.prototype._trySubscribe (http://localhost:4200/vendor.bundle.js:4172:13)",
Symbol(observable)_h.fo48yw1o6i8: undefined,
Symbol(rxSubscriber)_g.fo48yw1o6i8: undefined
What am I doing wrong?
There is a conflict between pace and the changes in zone.js v0.8.12 - see below for details. To fix the issue I made sure to load pace.min.js after zone.min.js and the other IE polyfills and it worked like a charm.
https://github.com/HubSpot/pace/issues/399
https://github.com/angular/zone.js/issues/816