Skip to content

CDK documentation wrong [Portal] #11825

Closed
@djleonskennedy

Description

@djleonskennedy

Bug, feature request, or proposal:

Bug

What is the expected behavior?

attach(), detach() should return a Promise

What is the current behavior?

attach(), detach() do not return a Promise

What are the steps to reproduce?

Providing a StackBlitz reproduction is the best way to share your issue.

According to documentation attach(), detach() return a Promise

image

https://stackblitz.com/edit/angular-cdk-portal-template-ygs7q1?file=app/app.component.ts

throws error: ERROR TypeError: this.portalHost.attach(...).then is not a function

What is the use-case or motivation for changing an existing behavior?

We have behavior that requires as to run mechanism only when component is attached

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

angular, material 6.x.x

Is there anything else we should know?

Metadata

Metadata

Assignees

Labels

P4A relatively minor issue that is not relevant to core functionsdocsThis issue is related to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions