angular-cn/aio/content/guide/updating-to-version-9.md

3.3 KiB

Updating to Angular Version 9

This guide contains everything you need to know about updating to the next Angular version.

Version 9 Schematics

If your application uses the CLI, you can update to version 9 automatically with the help of the ng update script. The script will run a series of small migrations that will transform the code of your application to be compatible with version 9.

If you're curious about the specific migrations being run (e.g. what code is changing and why), the guides below provide more context on each change and contain FAQs for common questions.

Deprecations and Removals in Version 9

New Deprecations

API Replacement Deprecation announced Notes
entryComponents none v9 See entryComponents
ANALYZE_FOR_ENTRY_COMPONENTS none v9 See ANALYZE_FOR_ENTRY_COMPONENTS
ModuleWithProviders without a generic ModuleWithProviders with a generic v9 See ModuleWithProviders section

New Removals of Deprecated APIs

Package API Replacement Notes
@angular/core Renderer Renderer2 Migration guide.
@angular/core RootRenderer RendererFactory2 none
@angular/core RenderComponentType RendererType2 none
@angular/common DeprecatedI18NPipesModule CommonModule none
@angular/common DeprecatedCurrencyPipe CurrencyPipe none
@angular/common DeprecatedDatePipe DatePipe none
@angular/common DeprecatedDecimalPipe DecimalPipe none
@angular/common DeprecatedPercentPipe PercentPipe none
@angular/forms NgFormSelectorWarning none none
@angular/forms ngForm element selector ng-form element selector none