From 383457f898cf1813ba9fdbf1a7962cc42ebf67be Mon Sep 17 00:00:00 2001 From: Kara Erickson Date: Tue, 22 Oct 2019 17:49:25 -0700 Subject: [PATCH] docs: clean up deprecation guide (#33338) PR Close #33338 --- aio/content/guide/deprecations.md | 90 ++++++++++--------- .../form_control_directive.ts | 9 +- .../reactive_directives/form_control_name.ts | 7 +- 3 files changed, 58 insertions(+), 48 deletions(-) diff --git a/aio/content/guide/deprecations.md b/aio/content/guide/deprecations.md index 5e4decfa10..08a48ff90f 100644 --- a/aio/content/guide/deprecations.md +++ b/aio/content/guide/deprecations.md @@ -33,27 +33,36 @@ v9 - v12 --> -| Area | API or Feature | May be removed in | -| ---- | -------------- | ----------------- | -| `@angular/common` | [`ReflectiveInjector`](#reflectiveinjector) | v9 | -| `@angular/core` | [`CollectionChangeRecord`](#core) | v9 | -| `@angular/core` | [`DefaultIterableDiffer`](#core) | v9 | -| `@angular/core` | [`ModuleWithProviders` without a generic](#moduleWithProviders) | v10 | -| `@angular/core` | [`ReflectiveKey`](#core) | v9 | -| `@angular/core` | [`RenderComponentType`](#core) | v9 | -| `@angular/core` | [`ViewEncapsulation.Native`](#core) | v9 | -| `@angular/forms` | [`ngModel` with reactive forms](#ngmodel-reactive) | v9 | -| `@angular/router` | [`preserveQueryParams`](#router) | v9 | -| `@angular/upgrade` | [`@angular/upgrade`](#upgrade) | v9 | -| `@angular/upgrade` | [`getAngularLib`](#upgrade-static) | v9 | -| `@angular/upgrade` | [`setAngularLib`](#upgrade-static) | v9 | -| template syntax | [`/deep/`, `>>>`, and `::ng-deep`](#deep-component-style-selector) | unspecified | -| template syntax | [`](#template-tag) | v9 | -| polyfills | [reflect-metadata](#reflect-metadata) | v9 | -| `@angular/core` | [`defineInjectable`](#core) | v11 | -| `@angular/router` | [`loadChildren` string syntax](#loadChildren) | v11 | -| `@angular/router` | [`ActivatedRoute` params and `queryParams` properties](#activatedroute-props) | unspecified | -| `@angular/core/testing` | [`TestBed.get`](#testing) | v12 | +| Area | API or Feature | May be removed in | +| ----------------------------- | --------------------------------------------------------------------------- | ----------------- | +| `@angular/common` | [`ReflectiveInjector`](#reflectiveinjector) | v10 | +| `@angular/core` | [`CollectionChangeRecord`](#core) | v10 | +| `@angular/core` | [`DefaultIterableDiffer`](#core) | v10 | +| `@angular/core` | [`ReflectiveKey`](#core) | v10 | +| `@angular/core` | [`RenderComponentType`](#core) | v10 | +| `@angular/core` | [`ViewEncapsulation.Native`](#core) | v10 | +| `@angular/core` | [`WtfScopeFn`](api/core/WtfScopeFn) | v10 | +| `@angular/core` | [`wtfCreateScope`](api/core/wtfCreateScope) | v10 | +| `@angular/core` | [`wtfStartTimeRange`](api/core/wtfStartTimeRange) | v10 | +| `@angular/core` | [`wtfEndTimeRange`](api/core/wtfEndTimeRange) | v10 | +| `@angular/core` | [`wtfLeave`](api/core/wtfLeave) | v10 | +| `@angular/core` | [`ModuleWithProviders` without a generic](#moduleWithProviders) | v10 | +| `@angular/forms` | [`ngModel` with reactive forms](#ngmodel-reactive) | v10 | +| `@angular/router` | [`preserveQueryParams`](#router) | v10 | +| `@angular/upgrade` | [`@angular/upgrade`](#upgrade) | v10 | +| `@angular/upgrade` | [`getAngularLib`](#upgrade-static) | v10 | +| `@angular/upgrade` | [`setAngularLib`](#upgrade-static) | v10 | +| `@angular/platform-webworker` | [All entry points](api/platform-webworker) | v10 | +| template syntax | [`](#template-tag) | v10 | +| polyfills | [reflect-metadata](#reflect-metadata) | v10 | +| `@angular/core` | [`defineInjectable`](#core) | v11 | +| `@angular/core` | [`entryComponents`](api/core/NgModule#entryComponents) | v11 | +| `@angular/core` | [`ANALYZE_FOR_ENTRY_COMPONENTS`](api/core/ANALYZE_FOR_ENTRY_COMPONENTS) | v11 | +| `@angular/router` | [`loadChildren` string syntax](#loadChildren) | v11 | +| `@angular/core/testing` | [`TestBed.get`](#testing) | v12 | +| `@angular/router` | [`ActivatedRoute` params and `queryParams` properties](#activatedroute-props) | unspecified | +| template syntax | [`/deep/`, `>>>`, and `::ng-deep`](#deep-component-style-selector) | unspecified | + @@ -75,10 +84,10 @@ Tip: In the [API reference section](api) of this doc site, deprecated APIs are i | --- | ----------- | --------------------- | ----- | | [`CollectionChangeRecord`](api/core/CollectionChangeRecord) | [`IterableChangeRecord`](api/core/IterableChangeRecord) | v4 | none | | [`DefaultIterableDiffer`](api/core/DefaultIterableDiffer) | n/a | v4 | Not part of public API. | -| [`defineInjectable`](api/core/defineInjectable) | `ɵɵdefineInjectable` | v8 | Used only in generated code. No source code should depend on this API. | | [`ReflectiveInjector`](api/core/ReflectiveInjector) | [`Injector.create`](api/core/Injector#create) | v5 | See [`ReflectiveInjector`](#reflectiveinjector) | | [`ReflectiveKey`](api/core/ReflectiveKey) | none | v5 | none | | [`ViewEncapsulation.Native`](api/core/ViewEncapsulation#Native) | [`ViewEncapsulation.ShadowDom`](api/core/ViewEncapsulation#ShadowDom) | v6 | Use the native encapsulation mechanism of the renderer. See [view.ts](https://github.com/angular/angular/blob/3e992e18ebf51d6036818f26c3d77b52d3ec48eb/packages/core/src/metadata/view.ts#L32). +| [`defineInjectable`](api/core/defineInjectable) | `ɵɵdefineInjectable` | v8 | Used only in generated code. No source code should depend on this API. | | [`WtfScopeFn`](api/core/WtfScopeFn) | none | v8 | See [Web Tracing Framework](#wtf) | | [`wtfCreateScope`](api/core/wtfCreateScope) | none | v8 | See [Web Tracing Framework](#wtf) | | [`wtfStartTimeRange`](api/core/wtfStartTimeRange) | none | v8 | See [Web Tracing Framework](#wtf) | @@ -86,6 +95,9 @@ Tip: In the [API reference section](api) of this doc site, deprecated APIs are i | [`wtfLeave`](api/core/wtfLeave) | none | v8 | See [Web Tracing Framework](#wtf) | | [`entryComponents`](api/core/NgModule#entryComponents) | none | v9 | See [`entryComponents`](#entryComponents) | | [`ANALYZE_FOR_ENTRY_COMPONENTS`](api/core/ANALYZE_FOR_ENTRY_COMPONENTS) | none | v9 | See [`ANALYZE_FOR_ENTRY_COMPONENTS`](#entryComponents) | +| `ModuleWithProviders` without a generic | `ModuleWithProviders` with a generic | v9 | See [`ModuleWithProviders` section](#moduleWithProviders) | + + @@ -103,6 +115,7 @@ Tip: In the [API reference section](api) of this doc site, deprecated APIs are i | API | Replacement | Deprecation announced | Notes | | --- | ----------- | --------------------- | ----- | +| [`ngModel` with reactive forms](#ngmodel-reactive) | See [FormControlDirective usage notes](api/forms/FormControlDirective#use-with-ngmodel) | v6 | none | {@a router} ### @angular/router @@ -422,27 +435,22 @@ See the [dedicated migration guide for adding missing `@Injectable` decorators]( {@a removed} ## Removed APIs -The following APIs have been removed starting with version 8.0.0: +The following APIs have been removed starting with version 9.0.0*: -| Package | API | Replacement | Notes | -| ------- | -------------- | ----------- | ----- | -| [`@angular/http`](https://v7.angular.io/api/http) | All exports | [`@angular/common/http`](api/common/http) | See [below](#http). | -[`@angular/http/testing`](https://v7.angular.io/api/http/testing) | All exports | [`@angular/common/http/testing`](api/common/http/testing) | See [below](#http). | -| `@angular/platform-browser` | [`DOCUMENT`](https://v7.angular.io/api/platform-browser/DOCUMENT) | [`DOCUMENT` in `@angular/common`](api/common/DOCUMENT) | Updating to version 8 with [`ng update`](cli/update) changes this automatically. | -| `@angular/core/testing` | [`TestBed.deprecatedOverrideProvider()`](https://v7.angular.io/api/core/testing/TestBed#deprecatedoverrideprovider) | [`TestBed.overrideProvider()`](api/core/testing/TestBed#overrideprovider) | none | -| `@angular/core/testing` | [`TestBedStatic.deprecatedOverrideProvider()`](https://v7.angular.io/api/core/testing/TestBedStatic#deprecatedoverrideprovider) | [`TestBedStatic.overrideProvider()`](api/core/testing/TestBedStatic#overrideprovider) | none | -| `@angular/service-worker` | `versionedFiles` | `files` | In the service worker configuration file `ngsw-config.json`, replace `versionedFiles` with `files`. See [Service Worker Configuration](guide/service-worker-config#assetgroups). | +| Package | API | Replacement | Notes | +| ---------------- | -------------- | ----------- | ----- | +| `@angular/core` | [`Renderer`](https://v8.angular.io/api/core/Renderer) | [`Renderer2`](https://angular.io/api/core/Renderer2) | [Migration guide](guide/migration-renderer) | +| `@angular/core` | [`RootRenderer`](https://v8.angular.io/api/core/RootRenderer) | [`RendererFactory2`](https://angular.io/api/core/RendererFactory2) | none | +| `@angular/core` | [`RenderComponentType`](https://v8.angular.io/api/core/RenderComponentType) | [`RendererType2`](https://angular.io/api/core/RendererType2) | none | +| `@angular/common` | `DeprecatedI18NPipesModule` | [`CommonModule`](api/common/CommonModule#pipes) | none | +| `@angular/common` | `DeprecatedCurrencyPipe` | [`CurrencyPipe`](api/common/CurrencyPipe) | none | +| `@angular/common` | `DeprecatedDatePipe` | [`DatePipe`](api/common/DatePipe) | none | +| `@angular/common` | `DeprecatedDecimalPipe` | [`DecimalPipe`](api/common/DecimalPipe) | none | +| `@angular/common` | `DeprecatedPercentPipe` | [`PercentPipe`](api/common/PercentPipe) | none | +| `@angular/forms` | [`NgFormSelectorWarning`](https://v8.angular.io/api/forms/NgFormSelectorWarning) | none | none | +| `@angular/forms` | `ngForm` element selector | `ng-form` element selector | none | - -The following APIs have been removed starting with version 9.0.0: - -| Package | API | Replacement | Notes | -| ------- | -------------- | ----------- | ----- | -| `@angular/core` | [`Renderer`](https://v8.angular.io/api/core/Renderer) | [`Renderer2`](https://angular.io/api/core/Renderer2) | [Migration guide.](guide/migration-renderer) -| `@angular/core` | [`RootRenderer`](https://v8.angular.io/api/core/RootRenderer) | [`RendererFactory2`](https://angular.io/api/core/RendererFactory2) | none -| `@angular/core` | [`RenderComponentType`](https://v8.angular.io/api/core/RenderComponentType) | [`RendererType2`](https://angular.io/api/core/RendererType2) | none -| `@angular/forms` | [`NgFormSelectorWarning`](https://v8.angular.io/api/forms/NgFormSelectorWarning) | none | none -| `@angular/forms` | `ngForm` element selector | `ng-form` element selector | none +*To see APIs removed in version 8, check out this guide on the [version 8 docs site](https://v8.angular.io/guide/deprecations#removed). diff --git a/packages/forms/src/directives/reactive_directives/form_control_directive.ts b/packages/forms/src/directives/reactive_directives/form_control_directive.ts index 46a869f902..c329d5ab31 100644 --- a/packages/forms/src/directives/reactive_directives/form_control_directive.ts +++ b/packages/forms/src/directives/reactive_directives/form_control_directive.ts @@ -47,7 +47,8 @@ export const formControlBinding: any = { * ### Use with ngModel * * Support for using the `ngModel` input property and `ngModelChange` event with reactive - * form directives has been deprecated in Angular v6 and will be removed in Angular v7. + * form directives has been deprecated in Angular v6 and will be removed in a future version + * of Angular. * * Now deprecated: * @@ -73,9 +74,9 @@ export const formControlBinding: any = { * principles behind reactive forms, whereas adding a `FormControl`/`FormGroup` layer in * the class removes the convenience of defining forms in the template. * - * To update your code before v7, you'll want to decide whether to stick with reactive form - * directives (and get/set values using reactive forms patterns) or switch over to - * template-driven directives. + * To update your code before support is removed, you'll want to decide whether to stick + * with reactive form directives (and get/set values using reactive forms patterns) or + * switch over to template-driven directives. * * After (choice 1 - use reactive forms): * diff --git a/packages/forms/src/directives/reactive_directives/form_control_name.ts b/packages/forms/src/directives/reactive_directives/form_control_name.ts index 784ea62a30..83f10e7ffc 100644 --- a/packages/forms/src/directives/reactive_directives/form_control_name.ts +++ b/packages/forms/src/directives/reactive_directives/form_control_name.ts @@ -53,7 +53,8 @@ export const controlNameBinding: any = { * ### Use with ngModel * * Support for using the `ngModel` input property and `ngModelChange` event with reactive - * form directives has been deprecated in Angular v6 and will be removed in Angular v7. + * form directives has been deprecated in Angular v6 and will be removed in a future + * version of Angular. * * Now deprecated: * @@ -81,8 +82,8 @@ export const controlNameBinding: any = { * principles behind reactive forms, whereas adding a `FormControl`/`FormGroup` layer in * the class removes the convenience of defining forms in the template. * - * To update your code before v7, you'll want to decide whether to stick with reactive form - * directives (and get/set values using reactive forms patterns) or switch over to + * To update your code before support is removed, you'll want to decide whether to stick with + * reactive form directives (and get/set values using reactive forms patterns) or switch over to * template-driven directives. * * After (choice 1 - use reactive forms):