Angular 5.0.0 Final Release "Pentagonal Donut" disponibile per il download su GitHub!

Angular 5.0.0 Final Release "Pentagonal Donut" disponibile per il download su GitHub!

E' stata dura, ma ce l'hanno fatta: dopo nove release candidate che si sono succedute in poco meno di un mese e mezzo, la Final Release di Angular 5.0.0, nota da oggi come Pentagonal Donut, è finalmente uscita! La nuova versione porta con sé una serie di nuove funzionalità, miglioramenti prestazionali e (ahimé) cambiamenti non retro-compatibili al codice rispetto alla precedente v4: siamo certi che non mancheremo di amarla, specialmente dopo questa estenuante attesa!

Ecco il changelog cumulativo della nuova versione 5.x aggiornato ad oggi, giorno della pubblicazione di Angular 5.0.0 final sul GitHub ufficiale del progetto. Per informazioni aggiuntive sulle Release Candidate precedenti, potete dare un'occhiata a questo articolo (dalla RC0 alla RC7), a questo articolo (per la RC8) e infine a questo articolo (per la RC9).

Cos'altro è rimasto da dire? Probabilmente nulla, a parte forse un paio di parole in maiuscolo...

... ERA ORA !

:)

5.0.0 pentagonal-donut (2017-11-01)

Features

  • animations: allow @.disabled property to work without an expression (#18713) (2159342)
  • animations: report errors when invalid CSS properties are detected (#18718) (409688f), closes #18701
  • animations: support :increment and :decrement transition aliases (6f45519)
  • animations: support negative query limit values (86ffacf), closes #19259
  • common: accept object map for HttpClient headers & params (#18490) (1b1d5f1)
  • common: add an empty DeprecatedI18NPipesModule module (#18737) (83713dd)
  • common: drop use of the Intl API to improve browser support (#18284) (079d884), closes #10809 #9524 #7008 #9324#7590 #6724 #3429 #17576 #17478 #17319 #17200 #16838 #16624 #16625 #16591 #14131 #12632 #11376 #11187
  • common: generate closure-locale.ts to tree shake locale data (#18907) (4878936)
  • common: mark NgTemplateOutlet API as stable (0a73e8d)
  • compiler-cli: add watch mode to ngc (#18818) (06d01b2)
  • compiler-cli: lower metadata useValue and data literal fields (#18905) (0e64261)
  • compiler: add representation of placeholders to xliff & xmb (b3085e9), closes #17345
  • compiler: allow multiple exportAs names (#18723) (7ec28fe)
  • compiler: deprecate i18n comments in favor of ng-container (#18998) (66a5dab)
  • compiler: enabled strict checking of parameters to an @Injectable (#19412) (dfb8d21)
  • compiler: make .ngsummary.json files portable (2572bf5)
  • compiler: reuse the TypeScript typecheck for template typechecking. (#19152) (996c7c2)
  • compiler: set enableLegacyTemplate to false by default (#18756) (56238fe)
  • compiler: use typescript for resolving resource paths (43226cb)
  • core: Create StaticInjector which does not depend on Reflect polyfill. (d9d00bd)
  • core: add option to remove blank text nodes from compiled templates (#18823) (b8b551c)
  • core: support for bootstrap with custom zone (#17672) (344a5ca)
  • forms: add default updateOn values for groups and arrays (#18536) (ff5c58b)
  • forms: add options arg to abstract controls (ebef5e6)
  • forms: add status to AbstractControlDirective (233ef93)
  • forms: add updateOn and ngFormOptions to NgForm (0d45828)
  • forms: add updateOn blur option to FormControls (#18408) (333a708), closes #7113
  • forms: add updateOn submit option to FormControls (#18514) (f69561b)
  • forms: add updateOn support to ngModelOptions (1cfa79c)
  • http: deprecate @angular/http in favor of @angular/common/http (#18906) (72c7b6e)
  • platform-server: add an API to transfer state from server (#19134) (cfd9ca0)
  • platform-server: provide a DOM implementation on the server (2f2d5f3), closes #14638
  • platform-server: provide a way to hook into renderModule* (#19023) (8dfc3c3)
  • router: add ActivationStart/End events (8f79150)
  • router: add events tracking activation of individual routes (49cd851)
  • service-worker: introduce the @angular/service-worker package (#19274) (d442b68)
  • upgrade: propagate touched state of NgModelController (59c23c7)
  • upgrade: support lazy-loading Angular module into AngularJS app (30e76fc)
  • update angular to support TypeScript 2.4 (ca5aeba)

Performance Improvements

  • animations: reduce size of bundle by removing AST classes (#19539) (d5c9c5f)
  • compiler: don’t emit summaries for jit by default (b086891)
  • compiler: fix perf issue in loading aot summaries in jit compiler (fbc9537)
  • compiler: make the creation of ts.Program faster. (#19275) (edd5f5a)
  • compiler: only emit changed files for incremental compilation (745b59f)
  • compiler: only type check input files when using bazel (#19581) (0b06ea1)
  • compiler: only use tsickle if needed (#19275) (8f95b75)
  • compiler: skip type check and emit in bazel in some cases. (#19646) (a22121d)
  • compiler: speed up loading of summaries for bazel. (#19581) (81167d9)
  • compiler: speed up watch mode (#19275) (6665d76)
  • core: Remove decorator DSL which depends on Reflect (cac130e)
  • core: add option to remove blank text nodes from compiled templates (d2c0d98)
  • core: use native addEventListener for faster rendering. (#18107) (6279e50)
  • latest tsickle to tree shake: abstract class methods & interfaces (#18236) (b7a6f52)
  • switch angular to use StaticInjector instead of ReflectiveInjector (fcadbf4), closes #18496

BREAKING CHANGES

  • compiler: The method ngGetContentSelectors(), deprecated in Angular 4.0, has been removed. Use ComponentFactory.ngContentSelectors instead.
    • the Angular compiler now requires TypeScript 2.4.x.
  • router: RouterOutlet properties locationInjector and locationFactoryResolver have been removed as they were deprecated since v4.
  • compiler: the compiler option enableLegacyTemplate is now disabled by default as the <template> element has been deprecated since v4. Use <ng-template> instead. The option enableLegacyTemplate and the <template> element will both be removed in Angular v6.
  • core: OpaqueToken has been removed as it was deprecated since v4. Use InjectionToken instead.
  • platformXXXX() no longer accepts providers which depend on reflection. Specifically the method signature when from Provider[] to StaticProvider[].

Example: Before:

After:

NOTE: This only applies to platform creation and providers for the JIT compiler. It does not apply to @Component or @NgModuleprovides declarations.

Benchpress note: Previously Benchpress also supported reflective provides, which now require static providers.

I18n Changes (@angular/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.

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:
    • 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 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):

    Don't forget that you will still need to import the intl API polyfill if you want to use those deprecated pipes.

Date pipe
  • Breaking changes:
    • the predefined formats (shortshortTimeshortDatemedium, ...) 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/17instead 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.
    • the narrow version of the week day is now EEEEE instead of E, the format E is now similar to EE and EEE.
    • the timezone z will now fallback to O and output GMT+1 instead of the complete zone name (e.g. Pacific Standard Time), this is because the quantity of data required to have all the zone names in all of the existing locales is too big.
    • the timezone Z will now output the ISO8601 basic format, e.g. +0100, you should now use ZZZZ to get GMT+01:00.
    Field type Format Example value v4 v5
    Eras Narrow A for AD G GGGGG
    Months Narrow S for September L MMMMM
    Week day Narrow M for Monday E EEEEE
    Timezone Long location Pacific Standard Time z Not available
    Timezone Long GMT GMT+01:00 Z ZZZZ
  • Features
    • new predefined formats longfulllongTimefullTime.
    • 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.
    • week of the year is now supported with the formats w and ww, e.g. weeks 5 and 05.
    • week of the month is now supported with the format W, e.g. week 3.
    • fractional seconds are now supported with the format S to SSS.
    • day periods for AM/PM now supports additional formats aaaaaaaaa and aaaaa. The formats a to aaa are similar, while aaaa is the wide version if available (e.g. ante meridiem for am), or equivalent to a otherwise, and aaaaa is the narrow version (e.g. a for am).
    • extra day periods are now supported with the formats b to bbbbb (and B to BBBBB for the standalone equivalents), e.g. morningnoonafternoon, ....
    • 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
    • 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.
Currency pipe
  • Breaking change:
    • the default value for symbolDisplay is now symbol instead of code. This means that by default you will see $4.99for en-US instead of USD4.99 previously.
  • Deprecation:
    • the second parameter of the currency pipe (symbolDisplay) is no longer a boolean, it now takes the values codesymbol 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:
    • you can now choose between codesymbol 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 $).
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-USinstead of 314.1592% previously.

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#findProvidersinstead.
  • core: DebugNode#source has been removed as it was deprecated since v4.
  • router: the values truefalselegacy_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.PRIMITIVEinstead.
  • 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.
  • common: remove deprecated NgFor (#18758) (ec56760)
  • common: remove deprecated NgTemplateOutlet#ngOutletContext (#18780) (7522987)
  • compiler: remove option useDebug (#18778) (499d05d)
  • compiler: split compiler and core (#18683) (0cc77b4)
  • compiler: - @angular/platform-server now additionally depends on @angular/platform-browser-dynamic as a peer dependency.
  • core: remove deprecated ChangeDetectionRef argument in DifferFactory#create (#18757) (be9713c)
  • core: remove deprecated DebugNode#source (#18779) (d61b902)
  • core: remove deprecated OpaqueToken (#18971) (3c4eef8)
  • core: remove deprecated Testability#findBindings (#18782) (f2a2a6b)
  • core: remove deprecated TrackByFn (#18757) (596e9f4)
  • core: remove deprecated parameter for ErrorHandler (#18759) (8f41326)
  • platform-browser: remove deprecated NgProbeToken (#18760) (d7f42bf)
  • platform-webworker: remove deprecated PRIMITIVE (#18761) (a56468c)
  • router: remove deprecated RouterOutlet properties (#18781) (d1c4a94)
  • router: remove deprecated RouterOutlet properties (a9ef858)
  • router: remove deprecated initialNavigation options (#18781) (d76761b)
  • ReflectiveInjector is now deprecated as it will be remove. Use Injector.create as a replacement.

About Ryan

IT Project Manager, Web Interface Architect e Lead Developer di numerosi siti e servizi web ad alto traffico in Italia e in Europa. Dal 2010 si occupa anche della progettazione di App e giochi per dispositivi Android, iOS e Mobile Phone per conto di numerose società italiane. Microsoft MVP for Development Technologies dal 2018.

View all posts by Ryan

One Comment on “Angular 5.0.0 Final Release "Pentagonal Donut" disponibile per il download su GitHub!”

  1. Pingback: Full-Stack .NET Core with Angular React VueJS - Still viable in 2017-2018?

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *


The reCAPTCHA verification period has expired. Please reload the page.

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.