angular-docs-cn/tools/public_api_guard/common
Olivier Combe 5e0f982961 feat(ivy): use i18n locale data to determine the plural form of ICU expressions (#29249)
Plural ICU expressions depend on the locale (different languages have different plural forms). Until now the locale was hard coded as `en-US`.
For compatibility reasons, if you use ivy with AOT and bootstrap your app with `bootstrapModule` then the `LOCALE_ID` token will be set automatically for ivy, which is then used to get the correct plural form.
If you use JIT, you need to define the `LOCALE_ID` provider on the module that you bootstrap.
For `TestBed` you can use either `configureTestingModule` or `overrideProvider` to define that provider.
If you don't use the compat mode and start your app with `renderComponent` you need to call `ɵsetLocaleId` manually to define the `LOCALE_ID` before bootstrap. We expect this to change once we start adding the new i18n APIs, so don't rely on this function (there's a reason why it's a private export).
PR Close #29249
2019-05-30 15:09:02 -04:00
..
http docs: remove all deprecated `@stable` jsdoc tags (#23210) 2018-04-10 21:49:32 -07:00
common.d.ts feat(ivy): use i18n locale data to determine the plural form of ICU expressions (#29249) 2019-05-30 15:09:02 -04:00
http.d.ts feat: add support for TypeScript 3.1 (#26151) 2018-09-28 09:34:51 -07:00
testing.d.ts fix(common): add upgrade sub-package to ng_package rule for @angular/common (#30117) 2019-04-25 15:01:17 -07:00
upgrade.d.ts docs(docs-infra): add common/upgrade to API package sources (#30331) 2019-05-16 11:47:16 -07:00