angular-cn/packages/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 fix(common): prevent repeated application of HttpParams mutations (#29045) 2019-04-23 08:43:54 -07:00
locales style: enforce buildifier lint on CI (#28186) 2019-02-26 16:57:41 -08:00
src feat(ivy): use i18n locale data to determine the plural form of ICU expressions (#29249) 2019-05-30 15:09:02 -04:00
test feat(ivy): use i18n locale data to determine the plural form of ICU expressions (#29249) 2019-05-30 15:09:02 -04:00
testing fix(common): add upgrade sub-package to ng_package rule for @angular/common (#30117) 2019-04-25 15:01:17 -07:00
upgrade docs(common): update API docs for unified location service for upgrading (#30567) 2019-05-21 13:09:08 -07:00
BUILD.bazel fix(common): add upgrade sub-package to ng_package rule for @angular/common (#30117) 2019-04-25 15:01:17 -07:00
PACKAGE.md docs: add package doc files (#26047) 2018-10-05 15:42:14 -07:00
index.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
package.json build: update rxjs version requirements to 6.4.0 (#30032) 2019-04-22 11:15:33 -07:00
public_api.ts build: add bazel test rules for more packages (#21053) 2017-12-22 13:10:51 -08:00
tsconfig-build.json build: remove references to `tsc-wrapped` (#19298) 2017-09-21 13:55:52 -07:00