|
8 | 8 | * file.
|
9 | 9 | *
|
10 | 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. |
| 11 | + * automatically update themselves. This includes recent versions of Safari, Chrome (including |
| 12 | + * Opera), Edge on the desktop, and iOS and Chrome on mobile. |
13 | 13 | *
|
14 |
| - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html |
| 14 | + * Learn more in https://angular.io/guide/browser-support |
15 | 15 | */
|
16 | 16 |
|
17 | 17 | /***************************************************************************************************
|
18 | 18 | * BROWSER POLYFILLS
|
19 | 19 | */
|
20 | 20 |
|
21 |
| -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ |
22 |
| -import 'core-js/es/symbol'; |
23 |
| -import 'core-js/es/object'; |
24 |
| -import 'core-js/es/function'; |
25 |
| -import 'core-js/es/parse-int'; |
26 |
| -import 'core-js/es/parse-float'; |
27 |
| -import 'core-js/es/number'; |
28 |
| -import 'core-js/es/math'; |
29 |
| -import 'core-js/es/string'; |
30 |
| -import 'core-js/es/date'; |
31 |
| -import 'core-js/es/array'; |
32 |
| -import 'core-js/es/regexp'; |
33 |
| -import 'core-js/es/map'; |
34 |
| -import 'core-js/es/set'; |
35 |
| -/** Evergreen browsers require these. **/ |
36 |
| -import 'core-js/es/reflect'; |
| 21 | +/** |
| 22 | + * By default, zone.js will patch all possible macroTask and DomEvents |
| 23 | + * user can disable parts of macroTask/DomEvents patch by setting following flags |
| 24 | + * because those flags need to be set before `zone.js` being loaded, and webpack |
| 25 | + * will put import in the top of bundle, so user need to create a separate file |
| 26 | + * in this directory (for example: zone-flags.ts), and put the following flags |
| 27 | + * into that file, and then add the following code before importing zone.js. |
| 28 | + * import './zone-flags'; |
| 29 | + * |
| 30 | + * The flags allowed in zone-flags.ts are listed here. |
| 31 | + * |
| 32 | + * The following flags will work for all browsers. |
| 33 | + * |
| 34 | + * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame |
| 35 | + * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick |
| 36 | + * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames |
| 37 | + * |
| 38 | + * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js |
| 39 | + * with the following flag, it will bypass `zone.js` patch for IE/Edge |
| 40 | + * |
| 41 | + * (window as any).__Zone_enable_cross_context_check = true; |
| 42 | + * |
| 43 | + */ |
37 | 44 |
|
38 | 45 | /***************************************************************************************************
|
39 |
| - * Zone JS is required by Angular itself. |
| 46 | + * Zone JS is required by default for Angular itself. |
40 | 47 | */
|
41 |
| -import 'zone.js/dist/zone'; // Included with Angular CLI. |
42 |
| - |
43 |
| -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ |
44 |
| -// import 'classlist.js'; // Run `npm install --save classlist.js`. |
45 |
| - |
46 |
| -/** IE10 and IE11 requires the following to support `@angular/animation`. */ |
47 |
| -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. |
48 |
| - |
49 |
| - |
50 |
| -/** ALL Firefox browsers require the following to support `@angular/animation`. **/ |
51 |
| -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. |
| 48 | +import 'zone.js'; // Included with Angular CLI. |
52 | 49 |
|
53 | 50 |
|
54 | 51 | /***************************************************************************************************
|
55 | 52 | * APPLICATION IMPORTS
|
56 | 53 | */
|
57 |
| - |
58 |
| -/** |
59 |
| - * Date, currency, decimal and percent pipes. |
60 |
| - * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 |
61 |
| - */ |
62 |
| -// import 'intl'; // Run `npm install --save intl`. |
0 commit comments