What’s new in Angular 6 and why shall we upgrade to it?

Technology CommunityCategory: AngularWhat’s new in Angular 6 and why shall we upgrade to it?
VietMX Staff asked 3 years ago
  • Angular Elements – Angular Elements is a project that lets you wrap your Angular components as Web Components and embed them in a non-Angular application.
  • New Rendering Engine: Ivy – increases in speed and decreases in application size.
  • Tree-shakeable providers – a new, recommended, way to register a provider, directly inside the @Injectable() decorator, using the new providedIn attribute
  • RxJS 6 – Angular 6 now uses RxJS 6 internally, and requires you to update your application also. RxJS released a library called rxjs-compat, that allows you to bump RxJS to version 6.0 even if you, or one of the libraries you’re using, is still using one of the “old” syntaxes.
  • ElementRef<T> – in Angular 5.0 or older, is that the said ElementRef had its nativeElement property typed as any. In Angular 6.0, you can now type ElementRef more strictly.
  • Animations – The polyfill web-animations-js is not necessary anymore for animations in Angular 6.0, except if you are using the AnimationBuilder.
  • i18n – possibility to have “runtime i18n”, without having to build the application once per locale.