angular-docs-cn/packages/common/test
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
..
directives test(common): update common tests to use static flag (#30626) 2019-05-23 10:31:32 -07:00
i18n feat(ivy): use i18n locale data to determine the plural form of ICU expressions (#29249) 2019-05-30 15:09:02 -04:00
location feat(common): provide replacement for AngularJS $location service (#30055) 2019-04-24 13:49:29 -07:00
pipes feat(common): stricter types for SlicePipe (#30156) 2019-05-17 14:21:36 -07:00
BUILD.bazel feat(common): add ability to retrieve the state from Location service (#30055) 2019-04-24 13:49:28 -07:00
common_module_spec.ts test(ivy): run common tests with ivy on ci (#27071) 2018-11-13 10:59:55 -08:00
cookie_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
spies.ts build: fix file paths after moving modules/@angular/* to packages/* 2017-03-08 16:29:28 -08:00
viewport_scroller_spec.ts fix(common): escape query selector used when anchor scrolling (#29577) 2019-03-29 10:39:38 -07:00