Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 492 Bytes

File metadata and controls

22 lines (18 loc) · 492 Bytes

angular-toasts

Angular directive for Bootstap "toast" notifications.

Usage

Some where in your HTML, use the directive:

<div toast="{ timeout: 2500, position: 'top' }"></div>

Then, when you want to display a notification, do so with an Angular $broadcast:

$rootScope.$broadcast("toast", {
	type: "alert-success",
	text: "This is a successful message!"
});
$rootScope.$broadcast("toast", {
	type: "alert-error",
	text: "Oh no! Something bad has happened"
});