Skip to content

Commit b29db0b

Browse files
committed
chore: add refreshTimer instructions to README
1 parent be39849 commit b29db0b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,18 @@ app.controller('foo', function($scope, toastr) {
124124
});
125125
```
126126

127+
#### Refreshing an opened toast:
128+
129+
```javascript
130+
app.controller('foo', function($scope, toastr) {
131+
var toast = toastr.error('You are not allowed to do this!');
132+
// after doing something...
133+
toastr.refreshTimer(toast, 5000);
134+
});
135+
```
136+
137+
The second parameter is optional and will fallback to the configured timeOut.
138+
127139
It return the number of active toasts in screen.
128140

129141
#### Other options

0 commit comments

Comments
 (0)