Our content is free thanks to ag-Grid

ag-Grid is the industry leading JavaScript datagrid

ag-grid.com

What’s new After Angular 8

Post Editor

We got many new features with the release of Angular 8, Angular 9 will be released around November 2019. There are a lot of interesting things happening after Angular 8 was released in May, we have Ivy as default, ng deploy is officially support by CLI and many more.

2 min read
post

What’s new After Angular 8

We got many new features with the release of Angular 8, Angular 9 will be released around November 2019. There are a lot of interesting things happening after Angular 8 was released in May, we have Ivy as default, ng deploy is officially support by CLI and many more.

post
post
2 min read
2 min read

In this blog post let’s see what is going on with Angular 8 post the official release in May 2019.

Introduction

We got many new features with the release of Angular 8, Angular 9 will be released around November 2019. There are a lot of interesting things happening after Angular 8 was released in May, we have Ivy as default, ng deploy is officially support by CLI and many more.

New Features

Capture Location Updates from AngularJS Application

A new hook onChange is added, this hook can be used to capture changes to browser URL done by AngularJS application. Below is the code snippet from spec file, you can pass changeListener and errorHandler function

$location.onChange(changeListener, errorHandler);
function changeListener(url: string, state: unknown) 
{ 
      return undefined; 
} 
function errorHandler(e: Error) {}

Unit Test Helpers

2 new Unit Test Helpers are added so we can Unit Test Angular Service while upgrading AngularJS project.

Typescript

Typescript 3.5.x is required with 8.2.0 release.

Migration from Renderer to Renderer2

Renderer was deprecated long back and new Renderer2 was introduced, now ng update will automatically migrate the code to Renderer2.

Support $element in the upgraded component

An upgraded component that uses a template function doesn’t receive the $element or $attrs arguments earlier, now it will receive $element.

Deprecations

Platform WebWorker

Platform web worker packages @angular/platform-webworker and @angular/platform-webworker-dynamic are officially deprecated, the Angular team realized it's not good practice to run the Angular application on Web worker due to poor API and tooling support. If you are interested in learning more about it you can read the entire message on Commit

Web Tracing Framework

Angular supported the integration with the Web Tracing Framework (WTF) for performance testing. As it is not maintained and fails for the majority of applications, this is deprecated now.

Breaking Changes

Slice Pipe

The SlicePipe used to take vale of type any earlier, SlicePipe now only accepts an array of values, a string, null or undefined. It will throw a compilation error if any other data type is used.

Angular CLI

  • The Angular root component in the default app is redesigned to include few commands on UI.
  • ng deploy command is added for supporting the deployment builders created by the community.
  • While creating a new module you can also define if you need the module to be lazy-loaded. The below command generates the ProductModule and will add the routing configuration in app-routing.module to lazy load the ProductModule
ng g module product --routing true --route product --module app
  • In Angular, 8 differential loading feature was added, and compiler used to build the application twice once for ES2015 and another with ES5 which caused a lot of confusion for the developers, as we have seen many questions over StackOverflow and on GitHub as well. With latest CLI release you will not notice this behavior anymore. With CIL 8.3.0 only the ES2015 application is built and then the resulting application bundles are then down leveled directly.

Conclusion

The Angular 9.next is already available and Ivy is now the default rendering engine and in a few months we will have RC version and it will be clear what more we can expect from Angular. There are a lot of performance improvements and bug fixes which is happening in parallel.

Discuss with community

Share

About the author

author_image
Santosh Yadav

Santosh is a GDE for Angular, he is an open-source contributor for Angular, NgRx, and Writer at AngularInDepth and DotNetTricks.

author_image

About the author

Santosh Yadav

Santosh is a GDE for Angular, he is an open-source contributor for Angular, NgRx, and Writer at AngularInDepth and DotNetTricks.

About the author

author_image
Santosh Yadav

Santosh is a GDE for Angular, he is an open-source contributor for Angular, NgRx, and Writer at AngularInDepth and DotNetTricks.

NxAngularCli
NxAngularCli
NxAngularCli

Featured articles

RxJSpost
21 January 20214 min read
RxJS in Angular: Part III

In my previous two articles we have discussed how to change our components which solve problems in imperative ways to do that in functional, reactive, RxJS way, and we of course had a lot of fun doing that.

RxJSpost
21 January 20214 min read
RxJS in Angular: Part III

In my previous two articles we have discussed how to change our components which solve problems in imperative ways to do that in functional, reactive, RxJS way, and we of course had a lot of fun doing that.

Read more
RxJSpostRxJS in Angular: Part III

21 January 2021

4 min read

In my previous two articles we have discussed how to change our components which solve problems in imperative ways to do that in functional, reactive, RxJS way, and we of course had a lot of fun doing that.

Read more
Angularpost
20 January 20216 min read
Angular and SOLID principles

In software engineering, making things work the first time is always easy. But, what if you want to add new functionalities to an existing code? Making iterations on an existing basis can be difficult to do without introducing bugs. This is where SOLID principles come into play.

Angularpost
20 January 20216 min read
Angular and SOLID principles

In software engineering, making things work the first time is always easy. But, what if you want to add new functionalities to an existing code? Making iterations on an existing basis can be difficult to do without introducing bugs. This is where SOLID principles come into play.

Read more
AngularpostAngular and SOLID principles

20 January 2021

6 min read

In software engineering, making things work the first time is always easy. But, what if you want to add new functionalities to an existing code? Making iterations on an existing basis can be difficult to do without introducing bugs. This is where SOLID principles come into play.

Read more
Angularpost
14 January 20216 min read
Demystifying Taiga UI root component: portals pattern in Angular

Just before new year we announced our new Angular UI kit library Taiga UI. If you go through Getting started steps, you will see that you need to wrap your app with the tui-root component. Let's see what it does and explore what portals are and how and why we use them.