Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What is new in Angular ?

What is new in Angular ?

Avatar for S M Asad Rahman

S M Asad Rahman

November 02, 2019

More Decks by S M Asad Rahman

Other Decks in Programming

Transcript

  1. Schematics • @angular-devkit/schematics released on Nov 2017 • Generates template

    based boilerplate code • Hooks for ng cli command • Smooth version update
  2. Angular Element • @angular/elements • export Angular component as Web

    component • Can be used any where; other frameworks, html • Can be used in any CMS like word press • Best fit for micro-front-end eco system
  3. Differential Loading • Till Angular 7 • compiler used to

    compile all ts files to js files • app bundle contains javascript for both modern & old browsers • With differential loading • compiler generates separate file for es5 and es2015 • Modern browsers only load less size faster es2015
  4. challenges • load faster in slow internet mobile devices ?

    • How to build faster ? • Less application memory footprint ? • More cleaner debugging ?
  5. Tree shaking • Previous render engine only could tree shakes

    application code • Ivy keeps track of directives used in each component • Tree shakes framework codes that not used in component
  6. Bye bye NgModule • Earlier angular component must be part

    of NgModule • NgModule controls dependency injection & component definition • NgModule contains ngZone, which controls dirtyChecking
  7. Bye bye NgModule • With Ivy component can be lazy

    loaded like module • Component can be dynamically declared and use injector onFly
  8. Incremental Dom • Every component gets compiled into a series

    of instructions. • These instructions create DOM trees and update them in-place when the data changes.
  9. Why Incremental DOM Better ? • Interpreter does not interpret

    component actual code, rather instruction reference • Since it is not actual command instructions from Interpreter itself tree shakable • Since at the time of rendering no actual instructions executed no memory needed to find the difference • Only change related instructions would be executed.
  10. Build faster ? • Only change related codes will recompile

    • Angular gives way for third party modules to keep cache
  11. Status of Ivy renderer • Try ivy with angular 8

    https://next.angular.io/guide/ivy • Ivy render made default in angular 9 • Angular 9 rcc version released