мое приложение не работает в браузере IE, у меня abp-zero-template 6.5.0 и angular vesrion 7.1.0 - PullRequest
0 голосов
/ 11 ноября 2019

Я запускаю приложение в IE 11, но мое приложение выдает синтаксические ошибки в консоли. в scripts.js и vendor.js

Ошибка :

Error

1 Ответ

0 голосов
/ 11 ноября 2019

Пожалуйста, проверьте файл polyfills, не откомментировали ли вы связанный импорт для браузера IE.

Содержимое файла polyfills выглядит следующим образом:

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';

/**
 * If the application will be indexed by Google Search, the following is required.
 * Googlebot uses a renderer based on Chrome 41.
 * https://developers.google.com/search/docs/guides/rendering
 **/
//import 'core-js/es6/array';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js';  // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following for the Reflect API. */
//import 'core-js/es6/reflect';

/**
 * Web Animations `@angular/platform-browser/animations`
 * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
 * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
 **/
// import 'web-animations-js';  // Run `npm install --save web-animations-js`.

 * Zone JS is required by default for Angular itself.
 */
import 'zone.js/dist/zone';  // Included with Angular CLI.

На скриншоте видно, что вы используете выражение функции стрелки, как мы все знаем, выражение функции стрелки не поддерживаетIE браузер . Пожалуйста, попробуйте использовать Babel , чтобы перевести его на ES5.

Кроме того, вы также можете попробовать установить babelfill в ваше угловое приложение.

...