docs: update i18n doc regarding aot compilation (#24875)

Add missing lines to code example to allow using ng serve with custom i18n configurations.

PR Close #24875
This commit is contained in:
Marius Lichtblau 2018-07-13 20:30:23 +02:00 committed by Victor Berchet
parent 1c533c913d
commit 7ebd8e59a8
1 changed files with 39 additions and 27 deletions

View File

@ -683,6 +683,8 @@ You also need to instruct the AOT compiler to use your translation configuration
* `i18nLocale`: the locale id. * `i18nLocale`: the locale id.
``` ```
"build": {
...
"configurations": { "configurations": {
... ...
"fr": { "fr": {
@ -694,6 +696,16 @@ You also need to instruct the AOT compiler to use your translation configuration
... ...
} }
} }
},
"serve": {
...
"configurations": {
...
"fr": {
"browserTarget": "angular.io-example:build:fr"
}
}
}
``` ```
You then pass the configuration with the `ng serve` or `ng build` commands. You then pass the configuration with the `ng serve` or `ng build` commands.