mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
* [ADF-4152] Moved content services docs to subfolders * [ADF-4152] Manual URL fixes for cont services docs * [ADF-4152] Moved content services docs to subfolders * [ADF-4152] Manual URL fixes for cont services docs * [ADF-4152] Updated doc index pages for content services
1.2 KiB
1.2 KiB
Title, Added, Status, Last reviewed
Title | Added | Status | Last reviewed |
---|---|---|---|
Confirm dialog component | v2.3.0 | Active | 2019-01-22 |
Confirm dialog component
Requests a yes/no choice from the user.
Basic Usage
constructor(private dialog: MatDialog) {}
...
let files = [
// Files defined here...
];
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
data: {
title: 'Upload',
message: `Are you sure you want to upload ${files.length} file(s)?`
},
minWidth: '250px'
});
dialogRef.afterClosed().subscribe((result) => {
if (result === true) {
event.resumeUpload();
}
});
Details
This component lets the user make a yes/no choice to confirm an action. Use the
Angular MatDialog
service to open the dialog, as shown in the example, and pass a data
object
with properties for the title
and message
to show. The afterClosed
event
of the MatDialog
gives you the user's choice via the result
parameter.