Akhil Ashok Posted on Dec 2, 2019 Angular 8 hi, any one knows how to pass multiple data to dialoge box? angular8 #java #springboot Top comments (4) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Collapse Expand Felix Wittmann Felix Wittmann Felix Wittmann Follow Location Germany Joined Jun 22, 2019 • Dec 2 '19 • Edited on Dec 2 • Edited Dropdown menu Copy link Hide What type of dialog boxes ? Or is your question how to pass multiple properties to a component ? Or do you open a javascript dialog with window.open ? Collapse Expand Akhil Ashok Akhil Ashok Akhil Ashok Follow Angular developer Location Kerala,India Education BTECH-COMPUTER SCIENCE Work software engineer at prvak technologies Joined Dec 2, 2019 • Dec 2 '19 • Edited on Dec 2 • Edited Dropdown menu Copy link Hide Matdialoge box Collapse Expand Felix Wittmann Felix Wittmann Felix Wittmann Follow Location Germany Joined Jun 22, 2019 • Dec 2 '19 • Edited on Dec 2 • Edited Dropdown menu Copy link Hide MatDialogConfig has a 'data' property. Maybe this is the place for own properties ? MatDialogConfig is the second parameter of the open method. Edit: When I understand it correctly. In your own dialog component you can than later access the MatDialogRef in your constructor. Edit: This looks better: you can inject the data. import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material'; .... export class YourDialogComponent { constructor( @Inject(MAT_DIALOG_DATA) public data: any, public dialogRef: MatDialogRef<YourDialogComponent > ) {....} Akhil Ashok Akhil Ashok Akhil Ashok Follow Angular developer Location Kerala,India Education BTECH-COMPUTER SCIENCE Work software engineer at prvak technologies Joined Dec 2, 2019 • Dec 2 '19 Dropdown menu Copy link Hide Ok Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse
Top comments (4)
What type of dialog boxes ?
Or is your question how to pass multiple properties to a component ?
Or do you open a javascript dialog with window.open ?
Matdialoge box
MatDialogConfig has a 'data' property.
Maybe this is the place for own properties ?
MatDialogConfig is the second parameter of the open method.
Edit:
When I understand it correctly.
In your own dialog component you can than later access the MatDialogRef in your constructor.
Edit:
This looks better:
you can inject the data.
Ok