Home Blogs Programming Getting Ready for the Ang ...

Getting Ready for the Angular 9.0.0 (December 2019 Update)

Angular 8, with polite delay, saw the light of day in June 2019. The next official release of the framework - Angular 9.0.0 - will be available in late 2019.  

What to expect from the upcoming version? Let’s check out the highlights of the Next versions.

In this article, we’ve compiled the changes that were introduced in versions of Angular 9.0.0-next.1 to Angular 9.0.0-RC.4, including bug fixes, breaking changes, reverts, deprecations, code refactoring, features, and performance improvements.

Angular website: angular.io
Angular GitHub: github.com/angular/changelog

==========

In this article:

  • Angular 9.0.0-rc.4 (November 27)
  • Angular 9.0.0-rc.3 (November 20)
  • Angular 9.0.0-rc.2 (November 11)
  • Angular 9.0.0-rc.1 (November 6)
  • ...
  • Angular 9.0.0-next.7
  • Angular 9.0.0-next.6
  • Angular 9.0.0-next.5
  • Angular 9.0.0-next.4
  • Angular 9.0.0-next.3
  • Angular 9.0.0-next.2
  • Angular 9.0.0-next.1

==========

Angular 9.0.0-rc.4 (November 27, 2019)

Features for language service:

  • completions support indexed types and tuple (immutable) arrays

Performance improvements for Ivy:

  • if a viewRef is moved to the same position, no work is done
  • time micro-benchmarks creation bug is fixed
  • NgModuleDefs that were already processed aren't processed again (R3TestBed)

Angular 9.0.0-rc.3 (November 20, 2019)

Features

  • bazel:
    • now you can use bazel v1.1.0 thanks to updated ng-add
  • core:
    • missing-injectable migration should migrate empty object literal providers

Performance Improvements

  • ivy: 
    • has an added micro-benchmark focused on directive input update
    • no longer stores public input names in two places
    • extracts template's instruction first create pass processing
    • improves the performance of transplanted views

Bug Fixes

  • bazel:
    • added terser as an optional peer dependency
  • compiler-cli:
    • getTsTypeFromBuiltinType was refactored
  • core:
    • make QueryList implement Iterable in the type system
  • ivy:
    • always re-analyzes the program during incremental rebuilds
    • avoids cyclical dependency in imports
    • constant object literals are shared across element and component instances
    • in full mode, ivy doesn't infer template context types
    • emits fs-relative paths when rootDir(s) aren't in effect
    • ExpressionChangedAfterItHasBeenCheckedError for SafeValue
    • extends assertion in directiveInject function to support IcuContainers
    • i18n - ensures that colons in i18n metadata are not rendered
    • i18n - supports "", "`" and "${" sequences in i18n messages
    • moves setClassMetadata calls into a pure life 
    • properly inserts views before ng-container with injected ViewContainerRef
    • properly inserts views into ViewContainerRef injected by querying
    • watch mode diagnostics are reported correctly
    • resets style property value defined using [style.prop.px]
    • retains JIT metadata unless JIT mode is explicitly disabled
    • shadows all DOM properties in DebugElement.properties
    • supports for #id bootstrap selectors
  • language-service:
    • makes Function alias callable
    • provides completions for attribute values
    • recomputes analyzed modules only when source files change
    • removed getTemplateReferences() from LanguageService API
  • ngcc:
    • always adds exports for ModuleWithProviders references
    • correctly associate decorators with aliased classes
    • correctly include internal .d.ts files
    • do not emit ES2015 code in ES5 files
    • generate correct metadata for classes with getter/setter properties
    • properly detect the origin of constructor param types
  • router:
    • make routerLinkActive work with query params which contain arrays
  • zone.js:
    • fixes typo of zone.js patch vrdisplaydisconnected property

Angular 9.0.0-rc.2

Breaking change for i18n:

  • The CLDR data has been updated to v36.0.0, which may cause some localized data strings to change. For example, the space separator used in numbers in the fr locales changed from \xa0 to \u202f.

Performance improvements for core:

  • Now avoids unnecessary creating provider factory

Reverts/fixes for Ivy:

  • When template changes in ngc watch mode, the component recompiles
  • If the user compiles modules with TestBed, this is the only case when registered modules can be restored
  • R3TestBed now cleans up registered modules after each test

Angular 9.0.0-rc.1

Features

  • common:
    • support loading locales from a global
  • ivy:
    • graceful evaluation of unknown or invalid expressions
  • ivy:
    • implement unknown element detection in jit mode

Performance Improvements to Ivy

  • add new benchmark focused on template creation
  • add ngIf-like directive to the ng_template benchmark
  • avoid native node retrieval from LView
  • avoid repeated native node retrieval and patching
  • avoid repeated tNode.initialInputs reads
  • move local references into consts array

Bug Fixes

  • compiler-cli: 
    • attach the correct viaModule to namespace imports
    • pass SourceFile to getLeadingTriviaWidth
    • remove unused CLI private exports
  • core: 
    • renderer-to-renderer2 migration not migrating methods
    • undecorated-classes-with-di migration should report config errors
  • ivy:
    • event handlers avoid implicit errors
    • fixed several crash issues related to unknown localref target and unknown pipe
    • more descriptive errors for nested i18n sections
  • language-service:
    • should no longer crash if expr ends unexpectedly
  • ngcc:
    • handle new __spreadArrays tslib helper
    • override getInternalNameOfClass() and getAdjacentNameOfClass() for ES5
    • render adjacent statements after static properties
    • render new definitions using the inner name of the class
  • service-worker:
    • ensure initialization before handling messages

Angular 9.0.0-next.7

Bug Fixes

  • bazel:
    • ng_package(data) should support non-text files
  • compiler-cli: 
    • fix typo in the diagnostic template info
  • core: 
    • initialize global ngDevMode without top-level side effects
    • make injector.get() return default value with InjectFlags.Self flag
  • ivy: 
    • avoid unnecessary i18n instructions generation for with structural directives
    • correct debug array names
    • DebugNode throws exceptions when querying some properties
    • ensure that window.ng utilities are published when NgModules are used
    • i18n – start generated placeholder name at PH
    • i18n – update the compiler to output MessageIds
    • i18n – use MessageId for matching translations
  • language-service: 
    • Lazily instantiate MetadataResolver
    • Use tsLSHost.fileExists() to resolve modules
  • ngcc:
    • consistently use outer declaration for classes
    • correctly read static properties for aliased classes
    • resolve imports in .d.ts files for UMD/CommonJS bundles
    • support UMD global factory in comma lists

Features

  • bazel:
    • support ts_library targets as entry-points for ng_package
  • core: 
    • add dynamic queries schematic
    • Mark TestBed.get as deprecated
  • ivy:
    • expose window.ng.getDebugNode helper
    • i18n – add syntax support for $localize metadata block
    • i18n – reorganize entry-points for better reuse
  • language-service: 
    • enable logging on TypeScriptHost
    • provide diagnostic for invalid templateUrls
    • provide diagnostics for invalid styleUrls

Performance Improvements

  • ivy: 
    • avoid metamorphic reads during property binding
    • avoid repeated view reads in pipe instructions
    • avoid repeated LView reads in property instructions
    • avoid unnecessary DOM reads in styling instructions
    • binding update benchmark
    • convert all node-based benchmark to use a testing harness
    • guard listening to outputs with isDirectiveHost
    • initialize TNode inputs/outputs on the first creation pass
    • introduce a benchmark for listeners registration
    • limit TNode.outputs reads
    • run the expanding rows benchmark with es2015
  • language-service:
    • keep analyzedModules cache when source files don’t change

Deprecations

  • core: 
    • TestBed.get function is marked as deprecated, use TestBed.inject instead.

Angular 9.0.0-next.6

Bug fixes

  • core:
    • improve the “missing $localize” error message
  • ivy:
    • capture template source mapping details during preliminary analysis 
    • handle expressions in i18n attributes properly
    • i18n – do not generate jsdoc comments for $localize 
    • maintain coalesced listeners order 
    • match class and attribute value without case-sensitivity 
    • node placed in incorrect order inside ngFor with ng-container 
    • restore global state after running refreshView 
    • template compiler should render correct $localize placeholder names 
    • unable to bind to properties that start with class or style 
    • unable to override ComponentFactoryResolver provider in tests 
    • warn instead of throwing for unknown properties
  • service-worker:
    • keep serving clients on older versions if the latest is invalidated
  • ngcc:
    • only back up the original prepublishOnly script and not the overwritten one
  • language-service:
    • Return empty external files during project initialization 
    • Use module resolution cache 

Code Refactoring

  • bazel:
    • remove @angular/bazel protractor rule now provided by @bazel/protractor

Features

  • language-service:
    • add definitions for styleUrls 
    • add a script to rebuild, refresh Angular dist
  • service-worker:
    • recover from EXISTING_CLIENTS_ONLY mode when there is a valid update

Performance Improvements

  • ivy:
    • check for animation synthetic props in dev mode only 
    • introduce a node-based micro-benchmarks harness 
    • replace select instruction with advance
    • run tree benchmark with bundles and ngDevMode off
  • ngcc:
    • process tasks in parallel in async mode

Breaking changes

  • bazel:
    • Angular bazel users using protractor_web_test_suite from @angular/bazel npm package should now switch to the @bazel/protractor npm package.

Angular 9.0.0-next.5

Bug fixes

  • ivy:
    • add missing closure extern for $localize 
    • ensure binding ordering doesn’t mess up when a NO_CHANGE value is encountered 
    • 18n – handle translated text containing HTML comments 
    • ngcc – improve the “ngcc version changed” error message 
    • Prevent errors when querying for elements outside Angular context
  • ngcc:
    • handle compilation diagnostics
  • language-service:
    • create DirectiveKind enum
    • invalidate Reflector caches when the program changes
    • update all files/directories owned by DevInfra to new DevInfra Framework team alias
    • re-add regressed templateUrl tests 
    • use ts.CompletionEntry for completions
  • common:
    • HttpParams fromObject accepts ReadonlyArray

Features

  • ivy:
    • implement $localize() global function
  • language-service:
    • add definitions for templateUrl
  • core:
    • Adds DI support for providedIn: 'platform'|'any' 
    • Introduce TestBed.inject to replace TestBed.get

Performance Improvements

  • ivy:
    • add a microbenchmark for map-based style and class bindings 
    • add a microbenchmark for style and class bindings 
    • add element and text creation benchmark
    • guard directive-related operations with a TNode flag
    • properly initialize global state in the element_text_create benchmark
    • remove renderStringify calls for text nodes creation 
    • remove repeated memory read / write in addComponentLogic 
    • run registerPostOrderHooks in the first template pass only
  • core:
    • Make PlatformLocation tree-shakable

Reverts

  • docs:
    • create Issue and Pull Request markdown doc, explaining automatic locking policy

Breaking changes

  • ivy:
    • This commit removes the public export of hasBeenProcessed()
  • core:
    • Injector.get now accepts abstract classes to return type-safe values. The previous implementation returned any through the deprecated implementation.

Angular 9.0.0-next.4

Bug fixes

  • ivy:
    • debug node names should match user declaration
    • ngtsc throws if “flatModuleOutFile” is set to null
    • reset binding index before executing a template in refreshView call
  • ngcc:
    • does not analyze dependencies for non-Angular entry-points

Features

  • ivy:
    • use the schema registry to check DOM bindings
  • core:
    • add undecorated classes with decorated fields schematic

Performance Improvements

  • ivy:
    • minimize writes to the lView[BINDING_INDEX] / binding root 
    • store binding metadata in the ngDevMode only

Angular 9.0.0-next.3

Bug fixes

  • bazel:
    • pin [@microsoft](https://github.com/microsoft)/api-extractor
  • ivy:
    • get name directly from nativeNode
    • handle empty bindings in the template type checker 
    • in ngcc, handle inline exports in commonjs code
    • ngcc should only index .d.ts exports within the package 
    • ngTemplateOutlet error when switching between null and template value
    • run template type-checking for all components 
  • compiler:
    • return enableIvy true when using readConfiguration
  • ngcc:
    • handle deep imports that already have an extension
    • ignore format properties that exist but are undefined
  • language-service:
    • instantiate MetadataResolver once
    • remove ‘context’ used for module resolution
  • common:
    • update $locationShim to notify onChange listeners before emitting AngularJS events

Features

  • language-service:
    • support selector-less directive as base classes in Ivy
    • make the Ivy compiler the default for ngc 
    • convert all ngtsc diagnostics to ts.Diagnostics
  • core: 
    • add undecorated classes migration schematic
  • forms:
    • formControlName also accepts a number
  • compiler:
    • allow selector-less directives as base classes in View Engine

Performance Improvements

  • ivy:
    • auto-call select(0) for non-empty views only
    • avoid first template pass checks during view creation
    • avoid for-of loops at runtime
    • improve NaN checks in change detection
    • interpolation micro-benchmark
    • noop change detection micro-benchmark
    • don’t create holey arrays 
    • read selected index only when need in prop bindings
    • split hooks processing into init and check phases
    • split view processing into render (create) and refresh (update) pass
  • core:
    • make sanitization tree-shakable in Ivy mode

Breaking changes

  • ivy:
    • make Hammer support tree-shakable. Previously, in Ivy applications, Hammer providers were included by default. With this commit, apps that want Hammer support must import HammerModule in their root module.

Angular 9.0.0-next.2

Bug fixes

  • bazel:
    • disable treeshaking when generating FESM and UMD bundles
  • ivy:
    • reuse compilation scope for incremental template changes.
  • compiler:
    • do not remove whitespace wrapping i18n expansions 

Performance Improvements

  • ivy:
    • doesn’t read global state when interpolated values don’t change

Angular 9.0.0-next.1

Bug fixes

  • language-service:
    • getSourceFile() should only be called on TS files 
    • Make Definition and QuickInfo compatible with TS LS
  • upgrade:
    • compile downgraded components synchronously (if possible) 

* * *

HUSPI has been rated in the list of 100 best offshore software development firms of 2019.

You may also like