diff --git a/goldens/cdk/portal/index.api.md b/goldens/cdk/portal/index.api.md index 3091a8b8abc0..4df75c360a2c 100644 --- a/goldens/cdk/portal/index.api.md +++ b/goldens/cdk/portal/index.api.md @@ -111,14 +111,6 @@ export abstract class Portal { setAttachedHost(host: PortalOutlet | null): void; } -// @public @deprecated (undocumented) -export class PortalHostDirective extends CdkPortalOutlet { - // (undocumented) - static ɵdir: i0.ɵɵDirectiveDeclaration; - // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; -} - // @public (undocumented) export class PortalModule { // (undocumented) @@ -126,7 +118,7 @@ export class PortalModule { // (undocumented) static ɵinj: i0.ɵɵInjectorDeclaration; // (undocumented) - static ɵmod: i0.ɵɵNgModuleDeclaration; + static ɵmod: i0.ɵɵNgModuleDeclaration; } // @public @@ -155,14 +147,6 @@ export class TemplatePortal extends Portal> { viewContainerRef: ViewContainerRef; } -// @public @deprecated (undocumented) -export class TemplatePortalDirective extends CdkPortal { - // (undocumented) - static ɵdir: i0.ɵɵDirectiveDeclaration; - // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; -} - // (No @packageDocumentation comment for this package) ``` diff --git a/src/cdk/dialog/dialog-module.ts b/src/cdk/dialog/dialog-module.ts index bda86b4c4698..848ec299a6a7 100644 --- a/src/cdk/dialog/dialog-module.ts +++ b/src/cdk/dialog/dialog-module.ts @@ -29,9 +29,4 @@ export class DialogModule {} // See: https://github.com/angular/components/issues/30663. // Note: These exports need to be stable and shouldn't be renamed unnecessarily because // consuming libraries might have references to them in their own partial compilation output. -export { - CdkPortal as ɵɵCdkPortal, - CdkPortalOutlet as ɵɵCdkPortalOutlet, - TemplatePortalDirective as ɵɵTemplatePortalDirective, - PortalHostDirective as ɵɵPortalHostDirective, -} from '../portal'; +export {CdkPortal as ɵɵCdkPortal, CdkPortalOutlet as ɵɵCdkPortalOutlet} from '../portal'; diff --git a/src/cdk/overlay/fullscreen-overlay-container.spec.ts b/src/cdk/overlay/fullscreen-overlay-container.spec.ts index 2fd2af0fc67a..3ee762da3665 100644 --- a/src/cdk/overlay/fullscreen-overlay-container.spec.ts +++ b/src/cdk/overlay/fullscreen-overlay-container.spec.ts @@ -2,7 +2,6 @@ import {waitForAsync, TestBed} from '@angular/core/testing'; import {Component, ViewChild, ViewContainerRef, inject, DOCUMENT, Injector} from '@angular/core'; import {CdkPortal} from '../portal'; import {OverlayContainer, FullscreenOverlayContainer, createOverlayRef} from './index'; -import {TemplatePortalDirective} from '../portal/portal-directives'; describe('FullscreenOverlayContainer', () => { let injector: Injector; @@ -106,8 +105,8 @@ describe('FullscreenOverlayContainer', () => { /** Test-bed component that contains a TempatePortal and an ElementRef. */ @Component({ - template: `Cake`, - imports: [TemplatePortalDirective], + template: `Cake`, + imports: [CdkPortal], }) class TestComponentWithTemplatePortals { viewContainerRef = inject(ViewContainerRef); diff --git a/src/cdk/portal/portal-directives.ts b/src/cdk/portal/portal-directives.ts index 3e809d9d917c..e50814e91e9b 100644 --- a/src/cdk/portal/portal-directives.ts +++ b/src/cdk/portal/portal-directives.ts @@ -44,22 +44,6 @@ export class CdkPortal extends TemplatePortal { } } -/** - * @deprecated Use `CdkPortal` instead. - * @breaking-change 9.0.0 - */ -@Directive({ - selector: '[cdk-portal], [portal]', - exportAs: 'cdkPortal', - providers: [ - { - provide: CdkPortal, - useExisting: TemplatePortalDirective, - }, - ], -}) -export class TemplatePortalDirective extends CdkPortal {} - /** * Possible attached references to the CdkPortalOutlet. */ @@ -234,25 +218,8 @@ export class CdkPortalOutlet extends BasePortalOutlet implements OnInit, OnDestr } } -/** - * @deprecated Use `CdkPortalOutlet` instead. - * @breaking-change 9.0.0 - */ -@Directive({ - selector: '[cdkPortalHost], [portalHost]', - exportAs: 'cdkPortalHost', - inputs: [{name: 'portal', alias: 'cdkPortalHost'}], - providers: [ - { - provide: CdkPortalOutlet, - useExisting: PortalHostDirective, - }, - ], -}) -export class PortalHostDirective extends CdkPortalOutlet {} - @NgModule({ - imports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective], - exports: [CdkPortal, CdkPortalOutlet, TemplatePortalDirective, PortalHostDirective], + imports: [CdkPortal, CdkPortalOutlet], + exports: [CdkPortal, CdkPortalOutlet], }) export class PortalModule {} diff --git a/src/dev-app/portal/portal-demo.html b/src/dev-app/portal/portal-demo.html index e6aaefc7b2c8..2c3c1d632ab9 100644 --- a/src/dev-app/portal/portal-demo.html +++ b/src/dev-app/portal/portal-demo.html @@ -24,12 +24,12 @@

The portal outlet is here:

referring to something *in* the template (such as #item in @for). As such, the component has to use @ViewChild / @ViewChildren to get these references. See https://github.com/angular/angular/issues/7158 --> - +

- Why don't jokes work in octal?

- Because 7 10 11.

-
+

- Did you hear about this year's Fibonacci Conference?

- It's going to be as big as the last two put together.