polyfills.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* eslint-disable import/no-unassigned-import */
  2. /**
  3. * This file includes polyfills needed by Angular and is loaded before the app.
  4. * You can add your own extra polyfills to this file.
  5. *
  6. * This file is divided into 2 sections:
  7. * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
  8. * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
  9. * file.
  10. *
  11. * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
  12. * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
  13. * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
  14. *
  15. * Learn more in https://angular.io/guide/browser-support
  16. */
  17. /***************************************************************************************************
  18. * BROWSER POLYFILLS
  19. */
  20. /**
  21. * IE11 requires the following for NgClass support on SVG elements
  22. */
  23. // import 'classlist.js'; // Run `npm install --save classlist.js`.
  24. /**
  25. * Web Animations `@angular/platform-browser/animations`
  26. * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
  27. * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
  28. */
  29. // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
  30. /**
  31. * By default, zone.js will patch all possible macroTask and DomEvents
  32. * user can disable parts of macroTask/DomEvents patch by setting following flags
  33. * because those flags need to be set before `zone.js` being loaded, and webpack
  34. * will put import in the top of bundle, so user need to create a separate file
  35. * in this directory (for example: zone-flags.ts), and put the following flags
  36. * into that file, and then add the following code before importing zone.js.
  37. * import './zone-flags';
  38. *
  39. * The flags allowed in zone-flags.ts are listed here.
  40. *
  41. * The following flags will work for all browsers.
  42. *
  43. * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
  44. * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
  45. * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
  46. *
  47. * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
  48. * with the following flag, it will bypass `zone.js` patch for IE/Edge
  49. *
  50. * (window as any).__Zone_enable_cross_context_check = true;
  51. *
  52. */
  53. /***************************************************************************************************
  54. * Zone JS is required by default for Angular itself.
  55. */
  56. import 'zone.js'; // Included with Angular CLI.
  57. /***************************************************************************************************
  58. * APPLICATION IMPORTS
  59. */