angular/packages/localize
Alan Agius c9541f4c49 fix(localize): update ng add schematic to support Angular CLI version 15 (#47763)
Prior to this, the `@angular/localize/init` was added as a polyfill which caused the `@angular/localize` types not to be included in the TypeScript program which caused errors such as the below:

```
Error: src/app/app.component.ts:9:11 - error TS2304: Cannot find name '$localize'.
```

With the recent changes in the CLI (https://github.com/angular/angular-cli/pull/24032), adding `@angular/localize/init` as polyfil or in the `main.server.ts` is no longer necessary. Instead we add this as a TypeScript type. When users are running in JIT mode, we add `@angular/localize/init` as an additional entrypoint.

This change also exposes the `$localize` method as a global when importing `@angular/localize`.

Closes #47677

PR Close #47763
2022-10-17 09:58:21 +02:00
..
init fix(localize): update ng add schematic to support Angular CLI version 15 (#47763) 2022-10-17 09:58:21 +02:00
schematics fix(localize): update ng add schematic to support Angular CLI version 15 (#47763) 2022-10-17 09:58:21 +02:00
src docs: fix spelling (#46713) 2022-07-08 20:54:52 +00:00
test build: switch devmode output to es2015 (#44505) 2022-01-05 23:20:20 +00:00
tools refactor(localize): remove deprecated canParse method from TranslationParsers (#47275) 2022-09-06 09:57:02 -07:00
BUILD.bazel fix(localize): update ng add schematic to support Angular CLI version 15 (#47763) 2022-10-17 09:58:21 +02:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
localize.ts fix(localize): update ng add schematic to support Angular CLI version 15 (#47763) 2022-10-17 09:58:21 +02:00
package.json feat(core): add support for Node.js version 18 (#47730) 2022-10-11 17:21:19 +00:00
PACKAGE.md docs(localize): expose documentation for the @angular/localize package (#40317) 2021-03-19 12:36:10 -07:00
private.ts refactor(localize): init APF entry-point should not duplicate code (#45405) 2022-04-21 11:09:39 -07:00