https://github.com/xjpro/angular-toasts
AngularJS directive for Bootstap "toast" style notifications.
https://github.com/xjpro/angular-toasts
angularjs2 bootstrap javascript
Last synced: about 1 month ago
JSON representation
AngularJS directive for Bootstap "toast" style notifications.
- Host: GitHub
- URL: https://github.com/xjpro/angular-toasts
- Owner: xjpro
- Created: 2013-10-23T14:27:24.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2018-03-14T15:53:00.000Z (almost 8 years ago)
- Last Synced: 2023-08-03T21:49:12.355Z (over 2 years ago)
- Topics: angularjs2, bootstrap, javascript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# angular-toasts
Angular directive for Bootstap "toast" notifications.
## Usage
Some where in your HTML, use the directive:
```
```
Then, when you want to display a notification, do so with an Angular $broadcast:
```javascript
$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"
});
```