From 3d1ca53dd74a50661168f3745a7c5b478914c1cb Mon Sep 17 00:00:00 2001 From: MichelleRetroRabbit <148441143+MichelleRetroRabbit@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:58:28 +0200 Subject: [PATCH] docs(cdk/dialog): CDK Dialog docs missing explanation on how to access dialogRef when using a TemplateRef (#29381) * fix(cdk/dialog): CDK Dialog docs missing explanation on how to access dialogRef when using a TemplateRef Updated the dialog in the cdk to add an example on accessing the dialogRef when using TemplateRef Fixes #26193 * fix(cdk/dialog): CDK Dialog docs missing explanation on how to access dialogRef when using a TemplateRef Updated wording used to explain the example. Fixes #26193 --- src/cdk/dialog/dialog.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cdk/dialog/dialog.md b/src/cdk/dialog/dialog.md index fb7e1c95e16b..b5b7ae84841d 100644 --- a/src/cdk/dialog/dialog.md +++ b/src/cdk/dialog/dialog.md @@ -159,6 +159,14 @@ If you're using a `TemplateRef` for your dialog content, the data is available i ``` +If you're using a `TemplateRef` and need to access the `DialogRef`, you can use the following: + +```html + + Hello, {{data.name}} + +``` + ### Accessibility