Skip to content

AngularJS Toaster is a customized version of "toastr" non-blocking notification javascript library.

License

Notifications You must be signed in to change notification settings

anyeloamt-zz/AngularJS-Toaster

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AngularJS-Toaster

AngularJS Toaster is a AngularJS port of the toastr non-blocking notification jQuery library. Requires AngularJS v1.2.0, and animations use CSS3 transformations.

Current Version 0.4

Demo

Getting started

  1. Link scripts:
<link href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet" />
<link href="toaster.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js" ></script>
<script src="http://code.angularjs.org/1.2.0/angular-animate.min.js" ></script>
  1. Add toaster container directive: <toaster-container> </toaster-container>

  2. Prepare the call of toaster method:

	// Display an info toast with no title
	angular.module('main', ['toaster'])
	.controller('myController', function($scope, toaster) {
	    $scope.pop = function(){
	        toaster.pop('success', "title", "text");
	    };
	});
  1. Call controller method on button click:
<div ng-controller="myController">
    <button ng-click="pop()">Show a Toaster</button>
</div>

Other Options

// Change display position
<toaster-container toaster-options="{'position-class': 'toast-top-full-width'}"></toaster-container>

Animations

Unlike toastr, this library relies on ngAnimate and CSS3 transformations for animations.

Author

Jiri Kavulak

Credits

Inspired by http://codeseven.github.io/toastr/demo.html.

Copyright

Copyright © 2013 Jiri Kavulak.

License

AngularJS-Toaster is under MIT license - http://www.opensource.org/licenses/mit-license.php

About

AngularJS Toaster is a customized version of "toastr" non-blocking notification javascript library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published