AlertDialog

This is an overview of the most common usage of AlertDialog. For more information about the available properties, methods, or events, head over to the complete API documentation for AlertDialog.

El método alert() muestra un mensaje con un botón de OK. Puedes usarlo cuando tengas que mostrar información o notificaciones que no requieran de una acción por parte del usuario.

Este método forma parte del módulo de dialogs.


Uso básico

El método alert() esta disponible de forma global. Puedes llamarlo en cualquier lugar dentro de tu aplicacioón.

alert('Your message')
  .then(() => {
    console.log('Alert dialog closed.');
  });
alert({
  title: 'Your title',
  message: 'Your message',
  okButtonText: 'Your OK button text'
}).then(() => {
  console.log('Alert dialog closed');
});
Contributors