parent
39cd56038f
commit
c679a6fb7b
57
CHANGELOG.md
57
CHANGELOG.md
|
@ -48,19 +48,31 @@
|
|||
|
||||
### BREAKING CHANGES
|
||||
|
||||
#### Deprecated code
|
||||
* router: `RouterOutlet` properties `locationInjector` and `locationFactoryResolver` have been removed as they were deprecated since v4.
|
||||
* common: `NgFor` has been removed as it was deprecated since v4. Use `NgForOf` instead. This does not impact the use of`*ngFor` in your templates.
|
||||
* common: `NgTemplateOutlet#ngOutletContext` has been removed as it was deprecated since v4. Use `NgTemplateOutlet#ngTemplateOutletContext` instead.
|
||||
* core: `Testability#findBindings` has been removed as it was deprecated since v4. Use `Testability#findProviders` instead.
|
||||
* core: `DebugNode#source` has been removed as it was deprecated since v4.
|
||||
* router: the values `true`, `false`, `legacy_enabled` and `legacy_disabled` for the router parameter `initialNavigation` have been removed as they were deprecated. Use `enabled` or `disabled` instead.
|
||||
* core: `DifferFactory.create` no longer takes ChangeDetectionRef as a first argument as it was not used and deprecated since v4.
|
||||
* core: `TrackByFn` has been removed because it was deprecated since v4. Use `TrackByFunction` instead.
|
||||
* platform-webworker: `PRIMITIVE` has been removed as it was deprecated since v4. Use `SerializerTypes.PRIMITIVE` instead.
|
||||
* platform-browser: `NgProbeToken` has been removed from `@angular/platform-browser` as it was deprecated since v4. Import it from `@angular/core` instead.
|
||||
* core: `ErrorHandler` no longer takes a parameter as it was not used and deprecated since v4.
|
||||
* compiler: the option `useDebug` for the compiler has been removed as it had no effect and was deprecated since v4.
|
||||
|
||||
#### Other breaking changes
|
||||
* compiler: - `@angular/platform-server` now additionally depends on
|
||||
`@angular/platform-browser-dynamic` as a peer dependency.
|
||||
* common: Because of multiple bugs and browser inconsistencies, we have dropped the intl api in favor of data exported from the Unicode Common Locale Data Repository (CLDR).
|
||||
Unfortunately we had to change the i18n pipes (date, number, currency, percent) and there are some breaking changes.
|
||||
|
||||
1. I18n pipes
|
||||
* Breaking change:
|
||||
##### I18n pipes:
|
||||
- Breaking change:
|
||||
- By default Angular now only contains locale data for the language `en-US`, if you set the value of `LOCALE_ID` to another locale, you will have to import new locale data for this language because we don't use the intl API anymore.
|
||||
|
||||
* Features:
|
||||
- Features:
|
||||
- you don't need to use the intl polyfill for Angular anymore.
|
||||
- all i18n pipes now have an additional last parameter `locale` which allows you to use a specific locale instead of the one defined in the token `LOCALE_ID` (whose value is `en-US` by default).
|
||||
- all i18n pipes now have an additional last parameter `locale` which allows you to use a specific locale instead of the one defined in the token `LOCALE_ID` (whose default value is `en-US`).
|
||||
- the new locale data extracted from CLDR are now available to developers as well and can be used through an API (which should be especially useful for library authors).
|
||||
- you can still use the old pipes for now, but their names have been changed and they are no longer included in the `CommonModule`. To use them, you will have to import the `DeprecatedI18NPipesModule` after the `CommonModule` (the order is important):
|
||||
|
||||
|
@ -78,10 +90,10 @@ Unfortunately we had to change the i18n pipes (date, number, currency, percent)
|
|||
export class AppModule { }
|
||||
```
|
||||
|
||||
Dont forget that you will still need to import the intl API polyfill if you want to use those deprecated pipes.
|
||||
Don't forget that you will still need to import the intl API polyfill if you want to use those deprecated pipes.
|
||||
|
||||
2. Date pipe
|
||||
* Breaking changes:
|
||||
##### Date pipe
|
||||
- Breaking changes:
|
||||
- the predefined formats (`short`, `shortTime`, `shortDate`, `medium`, ...) now use the patterns given by CLDR (like it was in AngularJS) instead of the ones from the intl API. You might notice some changes, e.g. `shortDate` will be `8/15/17` instead of `8/15/2017` for `en-US`.
|
||||
- the narrow version of eras is now `GGGGG` instead of `G`, the format `G` is now similar to `GG` and `GGG`.
|
||||
- the narrow version of months is now `MMMMM` instead of `L`, the format `L` is now the short standalone version of months.
|
||||
|
@ -97,7 +109,7 @@ Unfortunately we had to change the i18n pipes (date, number, currency, percent)
|
|||
| Timezone | Long location | Pacific Standard Time | z | Not available |
|
||||
| Timezone | Long GMT | GMT+01:00 | Z | ZZZZ |
|
||||
|
||||
* Features
|
||||
- Features
|
||||
- new predefined formats `long`, `full`, `longTime`, `fullTime`.
|
||||
- the format `yyy` is now supported, e.g. the year `52` will be `052` and the year `2017` will be `2017`.
|
||||
- standalone months are now supported with the formats `L` to `LLLLL`.
|
||||
|
@ -109,34 +121,23 @@ Unfortunately we had to change the i18n pipes (date, number, currency, percent)
|
|||
- the short non-localized timezones are now available with the format `O` to `OOOO`. The formats `O` to `OOO` will output `GMT+1` while the format `OOOO` will be `GMT+01:00`.
|
||||
- the ISO8601 basic time zones are now available with the formats `Z` to `ZZZZZ`. The formats `Z` to `ZZZ` will output `+0100`, while the format `ZZZZ` will be `GMT+01:00` and `ZZZZZ` will be `+01:00`.
|
||||
|
||||
* Bug fixes
|
||||
- Bug fixes
|
||||
- the date pipe will now work exactly the same across all browsers, which will fix a lot of bugs for safari and IE.
|
||||
- eras can now be used on their own without the date, e.g. the format `GG` will be `AD` instead of `8 15, 2017 AD`.
|
||||
|
||||
3. Currency pipe
|
||||
* Breaking change:
|
||||
##### Currency pipe
|
||||
- Breaking change:
|
||||
- the default value for `symbolDisplay` is now `symbol` instead of `code`. This means that by default you will see `$4.99` for `en-US` instead of `USD4.99` previously.
|
||||
|
||||
* Deprecation:
|
||||
* Deprecation:
|
||||
- the second parameter of the currency pipe (`symbolDisplay`) is no longer a boolean, it now takes the values `code`, `symbol` or `symbol-narrow`. A boolean value is still valid for now, but it is deprecated and it will print a warning message in the console.
|
||||
|
||||
* Features:
|
||||
- Features:
|
||||
- you can now choose between `code`, `symbol` or `symbol-narrow` which gives you access to more options for some currencies (e.g. the canadian dollar with the code `CAD` has the symbol `CA$` and the symbol-narrow `$`).
|
||||
|
||||
4. Percent pipe
|
||||
* Breaking change
|
||||
##### Percent pipe
|
||||
- Breaking change
|
||||
- if you don't specify the number of digits to round to, the local format will be used (and it usually rounds numbers to 0 digits, instead of not rounding previously), e.g. `{{ 3.141592 | percent }}` will output `314%` for the locale `en-US` instead of `314.1592%` previously.
|
||||
* common: `NgFor` has been removed as it was deprecated since v4. Use `NgForOf` instead. This does not impact the use of`*ngFor` in your templates.
|
||||
* common: `NgTemplateOutlet#ngOutletContext` has been removed as it was deprecated since v4. Use `NgTemplateOutlet#ngTemplateOutletContext` instead.
|
||||
* core: `Testability#findBindings` has been removed as it was deprecated since v4. Use `Testability#findProviders` instead.
|
||||
* core: `DebugNode#source` has been removed as it was deprecated since v4.
|
||||
* router: the values `true`, `false`, `legacy_enabled` and `legacy_disabled` for the router parameter `initialNavigation` have been removed as they were deprecated. Use `enabled` or `disabled` instead.
|
||||
* core: `DifferFactory.create` no longer takes ChangeDetectionRef as a first argument as it was not used and deprecated since v4.
|
||||
* core: `TrackByFn` has been removed because it was deprecated since v4. Use `TrackByFunction` instead.
|
||||
* platform-webworker: `PRIMITIVE` has been removed as it was deprecated since v4. Use `SerializerTypes.PRIMITIVE` instead.
|
||||
* platform-browser: `NgProbeToken` has been removed from `@angular/platform-browser` as it was deprecated since v4. Import it from `@angular/core` instead.
|
||||
* core: `ErrorHandler` no longer takes a parameter as it was not used and deprecated since v4.
|
||||
* compiler: the option `useDebug` for the compiler has been removed as it had no effect and was deprecated since v4.
|
||||
|
||||
|
||||
<a name="4.3.6"></a>
|
||||
|
|
Loading…
Reference in New Issue