You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function addMessage(message) {
$scope.messages.push(message);
if (message.ttl && message.ttl !== -1) {
$timeout(function () {
$scope.deleteMessage(message);
}, message.ttl);
}
$scope.$apply(); // this line fix problem
}
Credits & thx to CalmNad
The text was updated successfully, but these errors were encountered:
maybe its better to wrap everything in a $timeout so it will be added in the next digest cycle? Not really fan of manually triggering $apply(). I already use a $timeout for deleting the message.
Same as
marcorinck#18
Credits & thx to CalmNad
The text was updated successfully, but these errors were encountered: