Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions goldens/cdk/portal/index.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,14 @@ export abstract class Portal<T> {
setAttachedHost(host: PortalOutlet | null): void;
}

// @public @deprecated (undocumented)
export class PortalHostDirective extends CdkPortalOutlet {
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<PortalHostDirective, "[cdkPortalHost], [portalHost]", ["cdkPortalHost"], { "portal": { "alias": "cdkPortalHost"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<PortalHostDirective, never>;
}

// @public (undocumented)
export class PortalModule {
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<PortalModule, never>;
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<PortalModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<PortalModule, never, [typeof CdkPortal, typeof CdkPortalOutlet, typeof TemplatePortalDirective, typeof PortalHostDirective], [typeof CdkPortal, typeof CdkPortalOutlet, typeof TemplatePortalDirective, typeof PortalHostDirective]>;
static ɵmod: i0.ɵɵNgModuleDeclaration<PortalModule, never, [typeof CdkPortal, typeof CdkPortalOutlet], [typeof CdkPortal, typeof CdkPortalOutlet]>;
}

// @public
Expand Down Expand Up @@ -155,14 +147,6 @@ export class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {
viewContainerRef: ViewContainerRef;
}

// @public @deprecated (undocumented)
export class TemplatePortalDirective extends CdkPortal {
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<TemplatePortalDirective, "[cdk-portal], [portal]", ["cdkPortal"], {}, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<TemplatePortalDirective, never>;
}

// (No @packageDocumentation comment for this package)

```
7 changes: 1 addition & 6 deletions src/cdk/dialog/dialog-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
5 changes: 2 additions & 3 deletions src/cdk/overlay/fullscreen-overlay-container.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -106,8 +105,8 @@ describe('FullscreenOverlayContainer', () => {

/** Test-bed component that contains a TempatePortal and an ElementRef. */
@Component({
template: `<ng-template cdk-portal>Cake</ng-template>`,
imports: [TemplatePortalDirective],
template: `<ng-template cdkPortal>Cake</ng-template>`,
imports: [CdkPortal],
})
class TestComponentWithTemplatePortals {
viewContainerRef = inject(ViewContainerRef);
Expand Down
37 changes: 2 additions & 35 deletions src/cdk/portal/portal-directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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 {}
4 changes: 2 additions & 2 deletions src/dev-app/portal/portal-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ <h2> The portal outlet is here: </h2>
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 -->
<ng-template cdk-portal>
<ng-template cdkPortal>
<p> - Why don't jokes work in octal?</p>
<p> - Because 7 10 11.</p>
</ng-template>

<div *cdk-portal>
<div *cdkPortal>
<p> - Did you hear about this year's Fibonacci Conference? </p>
<p> - It's going to be as big as the last two put together. </p>
</div>
Expand Down
Loading