I have a template like this :
Template.playDetails.created = function () {
/* Catch removed documents and redirect client if happens */
Games.find({_id: gameId}).observe({
removed: function () {
console.log("Ooops game deleted !");
Alerts("The game was deleted by owner", "danger");
Router.go("playList");
}
});
};
And when i delete a game the log is shown on console but neither Alerts or Router.go works.
I tried to call Router.go with a time out but that didn't change anythings
Meteor.setTimeout(function(){ Router.go('playList'); }, 10);
Is there anything i didn't do well ?