angular-cn/packages/common/src
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 docs(common): fix typo in ngSwitch directive description (#30483) 2019-05-30 13:34:22 -04: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
common.ts feat(ivy): convert [ngStyle] and [ngClass] to use ivy styling bindings (#28711) 2019-02-20 13:46:15 -08:00
common_module.ts docs: common with `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
cookie.ts feat(common): on-by-default XSRF support in HttpClient (#18108) 2017-07-13 17:22:02 -07:00
dom_tokens.ts docs: common with `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
platform_id.ts docs: convert all `@experimental` tags to `@publicApi` tags (#26595) 2018-10-19 14:35:52 -07:00
version.ts docs: common with `@publicApi` tags (#26595) 2018-10-19 14:35:53 -07:00
viewport_scroller.ts refactor(ivy): Move instructions back to ɵɵ (#30546) 2019-05-20 16:37:47 -07:00