You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -43,12 +43,12 @@ interface Data {
43
43
template: `
44
44
<h1>{{title}}</h1>
45
45
<button (click)="ref.close(true)">Close</button>
46
-
`
46
+
`,
47
47
standalone: true,
48
48
changeDetection: ChangeDetectionStrategy.OnPush
49
49
})
50
50
exportclassHelloWorldComponent {
51
-
ref:DialogRef<Data> =inject(DialogRef);
51
+
ref:DialogRef<Data, boolean> =inject(DialogRef);
52
52
53
53
get title() {
54
54
if (!this.ref.data) return'Hello world';
@@ -61,9 +61,9 @@ Inside the component, you'll have access to a `DialogRef` provider. You can call
61
61
62
62
> 💡 Tip
63
63
>
64
-
> If you define the types for your DialogRef provider, the `afterClosed$` and `close(params)` will be typed automatically.
64
+
> A publicly accessible property of type `DialogRef<Input, Output>` on your component will be used to infer the input and output types of your component.
65
65
66
-
Now we can use the `DialogService` to open open the modal and display the component:
66
+
Now we can use the `DialogService` to open the modal and display the component:
0 commit comments