Skip to content

Commit

Permalink
fix(portal): TemplatePortal generic parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
mina-skunk committed Dec 20, 2018
1 parent 12bf619 commit cf3e628
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cdk/portal/portal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class ComponentPortal<T> extends Portal<ComponentRef<T>> {
/**
* A `TemplatePortal` is a portal that represents some embedded template (TemplateRef).
*/
export class TemplatePortal<C = any> extends Portal<C> {
export class TemplatePortal<C = any> extends Portal<EmbeddedViewRef<C>> {
/** The embedded template that will be used to instantiate an embedded View in the host. */
templateRef: TemplateRef<C>;

Expand All @@ -142,7 +142,7 @@ export class TemplatePortal<C = any> extends Portal<C> {
* When a context is provided it will override the `context` property of the `TemplatePortal`
* instance.
*/
attach(host: PortalOutlet, context: C | undefined = this.context): C {
attach(host: PortalOutlet, context: C | undefined = this.context): EmbeddedViewRef<C> {
this.context = context;
return super.attach(host);
}
Expand Down

0 comments on commit cf3e628

Please sign in to comment.