docs: update localize migration doc (#33275)

The error message has been updated in #33199 to mention `ng add @angular/localize`.

This also fixes the tslint config (it needs to mention the complete side effect import).

PR Close #33275
This commit is contained in:
cexbrayat 2019-10-20 17:50:56 +02:00 committed by Andrew Kushnir
parent 398ff1e7e7
commit c0b90c2010
1 changed files with 5 additions and 3 deletions

View File

@ -43,8 +43,10 @@ This has the side-effect of attaching a minimal implementation of `$localize` to
If this import is missing, you will see an error message like this: If this import is missing, you will see an error message like this:
``` ```
Error: The global function `$localize` is missing. Error: It looks like your application or one of its dependencies is using i18n.
Please add `import '@angular/localize/init';` to your polyfills.ts file. Angular 9 introduced a global `$localize()` function that needs to be loaded.
Please run `ng add @angular/localize` from the Angular CLI.
(For non-CLI projects, add `import '@angular/localize/init';` to your polyfills.ts file)
``` ```
This schematic automatically adds the `@angular/localize/init` import for you This schematic automatically adds the `@angular/localize/init` import for you
@ -60,7 +62,7 @@ The import of `@angular/localize/init` may cause a tslint error for `no-import-s
"no-import-side-effect": [ "no-import-side-effect": [
true, true,
{ {
"ignore-module": "(core-js/.*|zone\\.js/.*|@angular\/localize)$" "ignore-module": "(core-js/.*|zone\\.js/.*|@angular/localize/init)$"
} }
] ]