Command
add
Is this a regression?
The previous version in which this bug was not present was
14.2.5
Description
Angular v15.0.0-next.5 contains the fix from @alan-agius4 to properly add the @angular/localize polyfill in a CLI app now that the polyfills.ts file is gone. 400a6b5
The polyfill is added when running ng add, but it looks like using $localize still doesn't work.
Error: src/app/app.component.ts:9:11 - error TS2304: Cannot find name '$localize'.
9 title = $localize`i18n-next`;
Minimal Reproduction
npx @angular/cli@15.0.0-next.4 new i18n-next --defaults
cd i18n-next
npm i
ng add @angular/localize@15.0.0-next.5 --skip-confirmation
then update app.component.ts with:
title = $localize`i18n-next`;
and run:
ng extract-i18n --output-path src/locale/
The same repro using the stable release of the CLI and fwk works out of the box.
Exception or Error
Error: src/app/app.component.ts:9:11 - error TS2304: Cannot find name '$localize'.
9 title = $localize`i18n-next`;
Your Environment
Angular CLI: 15.0.0-next.4
Node: 16.17.0
Package Manager: npm 6.14.17
OS: darwin arm64
Angular: 15.0.0-next.5
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1500.0-next.4
@angular-devkit/build-angular 15.0.0-next.4
@angular-devkit/core 15.0.0-next.4
@angular-devkit/schematics 15.0.0-next.4
@angular/cli 15.0.0-next.4
@schematics/angular 15.0.0-next.4
rxjs 7.5.7
typescript 4.7.4
Anything else relevant?
No response
Command
add
Is this a regression?
The previous version in which this bug was not present was
14.2.5
Description
Angular v15.0.0-next.5 contains the fix from @alan-agius4 to properly add the
@angular/localizepolyfill in a CLI app now that thepolyfills.tsfile is gone. 400a6b5The polyfill is added when running
ng add, but it looks like using$localizestill doesn't work.Minimal Reproduction
then update
app.component.tswith:and run:
The same repro using the stable release of the CLI and fwk works out of the box.
Exception or Error
Your Environment
Anything else relevant?
No response