Skip to content

Commit 81bb02e

Browse files
committed
Update README with latest changes
1 parent 083bc97 commit 81bb02e

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ You can customize the entire library like:
104104
```javascript
105105
app.config(function(toastrConfig) {
106106
angular.extend(toastrConfig, {
107-
allowHtml: true,
107+
allowHtml: false,
108108
closeButton: false,
109109
closeHtml: '<button>&times;</button>',
110110
containerId: 'toast-container',
@@ -116,6 +116,9 @@ app.config(function(toastrConfig) {
116116
warning: 'toast-warning'
117117
},
118118
messageClass: 'toast-message',
119+
newestOnTop: true,
120+
onHidden: null,
121+
onShown: null,
119122
positionClass: 'toast-top-right',
120123
tapToDismiss: true,
121124
timeOut: 5000,
@@ -129,11 +132,14 @@ Those are the default values, you can pick what you need from it and override wi
129132

130133
* **allowHtml**: Your toast can use custom HTML here (See [Issue 3](https://github.com/Foxandxss/angular-toastr/issues/3))
131134
* **closeButton**: Whether to display an "X" close button on the toast.
132-
* **closeButton**: Html element to be used as a close button.
135+
* **closeHtml**: Html element to be used as a close button.
133136
* **containerId**: The name of the container where you want to append your toasts (the container will be created for you).
134137
* **extendedTimeOut**: The timeout after you hover a toast.
135138
* **iconClasses**: The default type classes for the different toasts.
136139
* **messageClass**: The class for the toast's message.
140+
* **newestOnTop**: Add new toasts on top of the old one. Put on false to put them on the bottom.
141+
* **onHidden**: A callback function called when a toast gets hidden.
142+
* **onShown**: A callback function called when a toast is shown.
137143
* **positionClass**: The position where the toasts are added.
138144
* **tapToDismiss**: Whether the toast should be dismissed when it is clicked.
139145
* **timeOut**: The timeout before the toasts disappear.
@@ -200,11 +206,14 @@ See how we passed a third parameter to the `toast`.
200206

201207
There you can override:
202208

209+
* **allowHtml**: Whether to allow HTML or not in a concrete toast.
203210
* **closeButton**: Putting a close button on the toast.
204211
* **closeHtml**: If you need to override how the close button looks like.
205212
* **extendedTimeout**: The timeout after you hover it.
206213
* **iconClass**: For the type class you want to use for the toast.
207214
* **messageClass**: If you want to modify the message look.
215+
* **onHidden**: Function to call when the toast gets hidden.
216+
* **onShown**: Function to call when the toast is shown.
208217
* **tapToDismiss**: If you want a concrete toast to toggle the close on click.
209218
* **timeOut**: For that concrete toast timeout.
210219
* **titleClass**: To override the title class of the toast.

0 commit comments

Comments
 (0)