fa79f51645
This commit changes the Angular compiler (ivy-only) to generate `$localize` tagged strings for component templates that use `i18n` attributes. BREAKING CHANGE Since `$localize` is a global function, it must be included in any applications that use i18n. This is achieved by importing the `@angular/localize` package into an appropriate bundle, where it will be executed before the renderer needs to call `$localize`. For CLI based projects, this is best done in the `polyfills.ts` file. ```ts import '@angular/localize'; ``` For non-CLI applications this could be added as a script to the index.html file or another suitable script file. PR Close #31609 |
||
---|---|---|
.. | ||
BUILD.bazel | ||
README.md | ||
mock_compile.ts | ||
mock_compiler_spec.ts | ||
r3_compiler_compliance_spec.ts | ||
r3_view_compiler_binding_spec.ts | ||
r3_view_compiler_di_spec.ts | ||
r3_view_compiler_directives_spec.ts | ||
r3_view_compiler_i18n_spec.ts | ||
r3_view_compiler_input_outputs_spec.ts | ||
r3_view_compiler_listener_spec.ts | ||
r3_view_compiler_providers_spec.ts | ||
r3_view_compiler_spec.ts | ||
r3_view_compiler_styling_spec.ts | ||
r3_view_compiler_template_spec.ts |
README.md
Tests in this directory should be run with:
yarn bazel test --define=compile=aot packages/compiler-cli/test/compliance:compliance