| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame^] | 1 | /* |
| 2 | Copyright 2020 TATA ELXSI |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the 'License'); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) |
| 17 | */ |
| 18 | /** |
| 19 | * This file includes polyfills needed by Angular and is loaded before the app. |
| 20 | * You can add your own extra polyfills to this file. |
| 21 | * |
| 22 | * This file is divided into 2 sections: |
| 23 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. |
| 24 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main |
| 25 | * file. |
| 26 | * |
| 27 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that |
| 28 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), |
| 29 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. |
| 30 | * |
| 31 | * Learn more in https://angular.io/guide/browser-support |
| 32 | */ |
| 33 | |
| 34 | /*************************************************************************************************** |
| 35 | * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. |
| 36 | */ |
| 37 | import '@angular/localize/init'; |
| 38 | |
| 39 | /*************************************************************************************************** |
| 40 | * BROWSER POLYFILLS |
| 41 | */ |
| 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 | /** |
| 47 | * Web Animations `@angular/platform-browser/animations` |
| 48 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. |
| 49 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). |
| 50 | */ |
| 51 | import 'web-animations-js'; // Run `npm install --save web-animations-js`. |
| 52 | |
| 53 | /** |
| 54 | * By default, zone.js will patch all possible macroTask and DomEvents |
| 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 | * |
| 75 | */ |
| 76 | |
| 77 | /*************************************************************************************************** |
| 78 | * Zone JS is required by default for Angular itself. |
| 79 | */ |
| 80 | import 'zone.js/dist/zone'; // Included with Angular CLI. |
| 81 | |
| 82 | /*************************************************************************************************** |
| 83 | * APPLICATION IMPORTS |
| 84 | */ |