DEV Community

mpjtn
mpjtn

Posted on • Updated on

Angular 9 - How to Prepare Yourself to the Ride (The Lazy Dev Addition).

I'm going filter some blogs|video to pure actions needed to be taken care so everybody could return quickly to routine, non blocking consumption of joy (and build great apps:)).

I'm not going to dive into ng-update, it should work but hey - Murphy's law..u know..

So some changes but not ALL, I try listing only the major ones that can be
handle ASAP.

  • HTML Class breaking changes

<button [class]="'Marry'" class="'Jane'"> </button>

At V 9 both work but only first one will effect.
TILL NOW IT WAS BROKEN!!!.

  • Testing:
    TestBed.inject replacing TestBed.get and require Generic Type.

  • Module with Providers - add generics to ModuleWithProvider like:

export class CleanningBowlModule{
static forRoot(config:BowlConfig}:ModuleWithProviders<MODULE-COME-HERE>)

  • ngForm tag replaced with ng-form.

  • Renderer replaced with Renderer2, check the follwing link to more extra info if u use heavily with the Renderer2:
    https://next.angular.io/guide/migration-renderer.

  • You cannot any more assign variable to Template Variable such ngIf , ngFor:

<div ngIf="dabber.isActive"></div>
<button #dabber (click)="dabber.isActive=!dabber.isActive"></button>

THE ABOVE will be break! you should replace all template only variable
with real class variables.

For more details and deep dive, check out the following awesome links:
https://www.youtube.com/watch?v=5wmWtgr7LQ0
https://www.youtube.com/watch?v=AKibI36WNhY&t=5shttps://medium.com/angular-in-depth/all-you-need-to-know-about-ivy-the-new-angular-engine-9cde471f42cf

Enjoy

Top comments (0)