angular-cn/packages/core/testing
Olivier Combe 6a8cca7975 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-04-15 10:40:26 -07:00
..
src feat(ivy): use i18n locale data to determine the plural form of ICU expressions (#29249) 2019-04-15 10:40:26 -07:00
BUILD.bazel build: enable bundle_dts for core package (#28884) 2019-03-08 12:36:55 -08:00
index.ts build: publish tree of files rather than FESMs (#18541) 2017-08-31 15:34:50 -07:00
package.json fix: correct several esm2015 entry-points in package.jsons (#22892) 2018-03-20 13:30:08 -07:00
public_api.ts build: refactor ambient node & jasmine types so they are only included where needed (#25491) 2018-08-16 13:46:43 -07:00
tsconfig-build.json feat(ivy): implement TestBed (#25369) 2018-08-14 11:58:47 -07:00