I have a component(In a route) where user can edit the info. After editing i wanna show a message like "Edited successfully". It's working and fine. What i want is after showing the message and waiting for 100 millisecond it will redirect the user into another page. For that i use javascript setTimeOut() function. Here is my code:
//displaying message
this.messages = true
//waiting for some momment
setTimeout(function(){
this.$router.push({ path: `/photos/${ this.photo.id }` });
}, 100);
Note: the this.$router.push working perfectly outside the setTimeOut() function