Angular dialogs example

This demo shows the usage of the different types of dialog with AngularJS.

Note that dialogs are easy to use and customizable.

This demo uses Bootstrap 3.3.5, Angular 1.5.5 and Angular-UI-Bootstrap 2.5.0.

Find the latest version of the Angular dialogs component at GitHub.

Default dialog

Show code
				
$dialogs.showDefaultDialog("AngularJS rocks!", {
	title: "Hello",
	closable:true
});
				
			

Default dialog

Show code
				
$dialogs.showConfirmationDialog("Please confirm that you want to destroy your computer.", {
	title: "Destroy your computer?",
	buttonOkText: 'Yes, please do it!',
	buttonCancelText : 'Maybe later',
	callback: function(option){
		if(option === "ok"){
			alert("Installing Windows Vista...");
		}
	}
});
				
			

Success dialogs

Show code
				
$dialogs.showSuccessDialog("Your account has been created!", {
	title: "Success",
	closeTimeout: 10
});
				
			

Info dialogs

Show code
				
$dialogs.showInfoDialog("Your body has the correct number of holes in it. Don't make any more.", {
	title: "Some useful information",
	buttonCloseText : 'I\'ll remember, thanks.'
});

$dialogs.showWaitDialog("This process may take few seconds, be patient!", {
	title: "Your request is being processed.",
	spin:true,
	icon: "glyphicon glyphicon-time"
});

//Close the dialog after 3 seconds
setTimeout(function(){
	$dialogs.closeDialog();
}, 3000);
				
			

Warning and Error dialogs

Show code
					
$dialogs.showWarningDialog("You new a coffee now!", {title: "Alert!"});
					
				
Show code
					
$dialogs.showErrorDialog("Something really bad happened :(", {title: "Error"});

$dialogs.showErrorDialog("Something really bad happened. Please, send a report and we will fix it", {
	title: "Alarm!",
	reportButton: true,
	reportButtonHandler: function(){
		alert("Cool, thanks for the report!");
	}
});