I'm using Angular CLI and show this message on IE9 "SCRIPT5009: 'Promise' is undefined". I remove the comments on polyfills.ts and in IE10 and IE11 work, but in IE9 not.
Asked
Active
Viewed 3,425 times
0
-
did you add promise polyfill? – Ans Bilal Jul 24 '18 at 13:06
-
@AnsBilal This package https://www.npmjs.com/package/promise-polyfill ? – user3453562 Jul 24 '18 at 13:11
-
yes and also go through this question https://stackoverflow.com/questions/42533264/getting-error-promise-is-undefined-in-ie11 – Ans Bilal Jul 24 '18 at 13:13
-
@AnsBilal Thanks! It is works! But show me other message "In this configuration Angular requires Zone.js" and this package I reinstalled but don't work. – user3453562 Jul 24 '18 at 13:59
-
import 'zone.js/dist/zone'; as an example in your e.g app.module.ts – Domi Jul 24 '18 at 14:23
-
@Domi it is worked! Just in polyfills.ts isn't enough? – user3453562 Jul 24 '18 at 14:44
1 Answers
0
add this to your src/polyfills.ts:
import 'core-js/es6/promise';

Sebastian Viereck
- 5,455
- 53
- 53
-
Tried import 'core-js/es/promise' but not working anymore. Something changed? – Gerald Hughes Oct 11 '21 at 18:34