-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: material/dialogfeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix
Description
Feature Description
Currently, Angular Material's MatDialog and CDK's Dialog components use MAT_DIALOG_DATA
for passing data. This feature proposes to allow the usage of @input for data sharing instead.
Use Case
This feature allows for greater flexibility and reusability of dialog components, particularly when using the Router option withComponentInputBinding
. For example:
// Proposed usage with @Input
@Component({
selector: 'app-my-dialog',
template: ``
})
export class MyDialogComponent {
@Input() name: string;
@Input() age: number;
}
// Open dialog
this.dialog.open(MyDialogComponent, {
data: { name: 'John', age: 30 }
});
spock123, JerDeArtur, natebundy and ferhado
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: material/dialogfeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix