|
| 1 | +/** |
| 2 | + * This file includes polyfills needed by Angular and is loaded before the app. |
| 3 | + * You can add your own extra polyfills to this file. |
| 4 | + * |
| 5 | + * This file is divided into 2 sections: |
| 6 | + * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. |
| 7 | + * 2. Application imports. Files imported after ZoneJS that should be loaded before your main |
| 8 | + * file. |
| 9 | + * |
| 10 | + * The current setup is for so-called "evergreen" browsers; the last versions of browsers that |
| 11 | + * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), |
| 12 | + * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. |
| 13 | + * |
| 14 | + * Learn more in https://angular.io/guide/browser-support |
| 15 | + */ |
| 16 | + |
| 17 | +/*************************************************************************************************** |
| 18 | + * BROWSER POLYFILLS |
| 19 | + */ |
| 20 | + |
| 21 | +/** IE9, IE10, IE11, and Chrome <55 requires all of the following polyfills. |
| 22 | + * This also includes Android Emulators with older versions of Chrome and Google Search/Googlebot |
| 23 | + */ |
1 | 24 |
|
| 25 | +// import 'core-js/es6/symbol'; |
| 26 | +// import 'core-js/es6/object'; |
| 27 | +// import 'core-js/es6/function'; |
| 28 | +// import 'core-js/es6/parse-int'; |
| 29 | +// import 'core-js/es6/parse-float'; |
| 30 | +// import 'core-js/es6/number'; |
| 31 | +// import 'core-js/es6/math'; |
| 32 | +// import 'core-js/es6/string'; |
| 33 | +// import 'core-js/es6/date'; |
| 34 | +// import 'core-js/es6/array'; |
| 35 | +// import 'core-js/es6/regexp'; |
| 36 | +// import 'core-js/es6/map'; |
| 37 | +// import 'core-js/es6/weak-map'; |
| 38 | +// import 'core-js/es6/set'; |
2 | 39 |
|
| 40 | +/** IE10 and IE11 requires the following for NgClass support on SVG elements */ |
| 41 | +// import 'classlist.js'; // Run `npm install --save classlist.js`. |
| 42 | + |
| 43 | +/** IE10 and IE11 requires the following for the Reflect API. */ |
| 44 | +// import 'core-js/es6/reflect'; |
3 | 45 |
|
4 | 46 | /**
|
5 | 47 | * Web Animations `@angular/platform-browser/animations`
|
6 | 48 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
7 | 49 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
8 |
| - **/ |
| 50 | + */ |
9 | 51 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
10 | 52 |
|
11 | 53 | /**
|
12 | 54 | * By default, zone.js will patch all possible macroTask and DomEvents
|
13 | 55 | * user can disable parts of macroTask/DomEvents patch by setting following flags
|
| 56 | + * because those flags need to be set before `zone.js` being loaded, and webpack |
| 57 | + * will put import in the top of bundle, so user need to create a separate file |
| 58 | + * in this directory (for example: zone-flags.ts), and put the following flags |
| 59 | + * into that file, and then add the following code before importing zone.js. |
| 60 | + * import './zone-flags.ts'; |
| 61 | + * |
| 62 | + * The flags allowed in zone-flags.ts are listed here. |
| 63 | + * |
| 64 | + * The following flags will work for all browsers. |
| 65 | + * |
| 66 | + * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame |
| 67 | + * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick |
| 68 | + * (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames |
| 69 | + * |
| 70 | + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js |
| 71 | + * with the following flag, it will bypass `zone.js` patch for IE/Edge |
| 72 | + * |
| 73 | + * (window as any).__Zone_enable_cross_context_check = true; |
| 74 | + * |
14 | 75 | */
|
15 | 76 |
|
16 |
| - // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame |
17 |
| - // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick |
18 |
| - // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames |
19 |
| - |
20 |
| - /* |
21 |
| - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js |
22 |
| - * with the following flag, it will bypass `zone.js` patch for IE/Edge |
23 |
| - */ |
24 |
| -// (window as any).__Zone_enable_cross_context_check = true; |
25 |
| - |
26 | 77 | /***************************************************************************************************
|
27 | 78 | * Zone JS is required by default for Angular itself.
|
28 | 79 | */
|
29 | 80 | import 'zone.js/dist/zone'; // Included with Angular CLI.
|
30 | 81 |
|
31 | 82 |
|
32 |
| - |
33 | 83 | /***************************************************************************************************
|
34 | 84 | * APPLICATION IMPORTS
|
35 | 85 | */
|
0 commit comments