ngToast
ngToast is a simple Angular provider for toast notifications.
Usage
bower install ngtoast --production# or npm install ng-toast --production
or manually download.
- Include ngToast source files and dependencies (ngSanitize, Bootstrap CSS):
Note: only the Alerts component is used as style base, so you don't have to include complete CSS
- Include ngToast as a dependency in your application module:
var app = angular;
- Place
toast
element into your HTML:
...
- Inject ngToast provider in your controller:
app;// for more info: http://tameraydin.github.io/ngToast/#api
Animations
ngToast comes with optional animations. In order to enable animations in ngToast, you need to include ngAnimate module into your app:
Built-in
- Include the ngToast animation stylesheet:
- Set the
animation
option.
app;
Built-in ngToast animations include slide
& fade
.
Custom
See the plunker using animate.css.
- Using the
additionalClasses
option and ngAnimate you can easily add your own animations or wire up 3rd party css animations.
app;
- Then in your CSS (example using animate.css):
/* Add any vendor prefixes you need */
Settings & API
Please find at the project website.
Development
- Clone the repo or download
- Install dependencies:
npm install && bower install
- Run
grunt watch
, play on /src - Build:
grunt
License
MIT http://tameraydin.mit-license.org/
Maintainers
TODO
- Add more unit & e2e tests