invertase/angular-toasty

Toast hidden when called programatically

Opened this issue · 0 comments

Whenever I call my toast from a function it's somehow not displayed, DOM also does not change. You can hear the sound though.

Only when it's called a second time it shows.

	function showToast(type, title, message) {
		toasty[type]({
			title: title,
			msg: message
		});
	}

	function checkExpired() {
		showToast("warning", "Warning", "Your session is about to expire. Click here to stay logged in!");
	}

setInterval(checkExpired, 5000);

When I call it from the ng-click directive in the view it works fine every time.