From fad4fcbfe5929247f9a8046fefba7159da0d5928 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Wed, 16 Jun 2021 10:01:10 +0300 Subject: [PATCH] add localize polyfill --- templates/app/angular/src/polyfills.ts | 9 ++++----- .../module/angular/projects/dev-app/src/polyfills.ts | 12 +++++------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/templates/app/angular/src/polyfills.ts b/templates/app/angular/src/polyfills.ts index 8a120c374d..9d6601bd5d 100644 --- a/templates/app/angular/src/polyfills.ts +++ b/templates/app/angular/src/polyfills.ts @@ -1,3 +1,7 @@ +/*************************************************************************************************** + * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. + */ +import '@angular/localize/init'; /** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. @@ -13,23 +17,19 @@ * * Learn more in https://angular.io/guide/browser-support */ - /*************************************************************************************************** * BROWSER POLYFILLS */ - /** * IE11 requires the following for NgClass support on SVG elements */ // import 'classlist.js'; // Run `npm install --save classlist.js`. - /** * 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`. - /** * By default, zone.js will patch all possible macroTask and DomEvents * user can disable parts of macroTask/DomEvents patch by setting following flags @@ -53,7 +53,6 @@ * (window as any).__Zone_enable_cross_context_check = true; * */ - /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ diff --git a/templates/module/angular/projects/dev-app/src/polyfills.ts b/templates/module/angular/projects/dev-app/src/polyfills.ts index 373f538a71..9d6601bd5d 100644 --- a/templates/module/angular/projects/dev-app/src/polyfills.ts +++ b/templates/module/angular/projects/dev-app/src/polyfills.ts @@ -1,3 +1,7 @@ +/*************************************************************************************************** + * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates. + */ +import '@angular/localize/init'; /** * This file includes polyfills needed by Angular and is loaded before the app. * You can add your own extra polyfills to this file. @@ -13,23 +17,19 @@ * * Learn more in https://angular.io/guide/browser-support */ - /*************************************************************************************************** * BROWSER POLYFILLS */ - /** * IE11 requires the following for NgClass support on SVG elements */ // import 'classlist.js'; // Run `npm install --save classlist.js`. - /** * 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`. - /** * By default, zone.js will patch all possible macroTask and DomEvents * user can disable parts of macroTask/DomEvents patch by setting following flags @@ -53,12 +53,10 @@ * (window as any).__Zone_enable_cross_context_check = true; * */ - /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ -import 'zone.js'; // Included with Angular CLI. - +import 'zone.js'; // Included with Angular CLI. /*************************************************************************************************** * APPLICATION IMPORTS