OpenVeo AngularJS back end

API Docs for: 3.0.0
Show:

alertService

Summary

Defines a generic alert management system to display one or several messages.

Item Index

Methods

Methods

add

Syntax

add

(
  • type
  • msg
  • [timeout]
)

Summary

Displays an alert.

Parameters:

  • type String

    The alert type (success, danger, warning or info)

  • msg String

    The alert message

  • [timeout] Number optional

    The timeout (in ms) before closing the alert, if not specified the alert will be permanent

Example:

// Info alert displayed for 4 seconds
AlertService.add('info', 'Message of the alert', 4000);

// Error alert displayed permanently
AlertService.add('danger', 'Message of the alert');

closeAll

Syntax

closeAll

()

Summary

Closes all opened alerts.

Example:

// Close all alerts
AlertService.closeAll();