Redirect page after delay using Vuejs

Today, We want to share with you Redirect page after delay using Vuejs.In this post we will show you vue router push callback, hear for settimeout in vue methods we will give you demo and example for implement.In this post, we will learn about vue router redirect with params with an example.

Redirect page after delay using Vuejs

There are the Following The simple About Redirect page after delay using Vuejs Full Information With Example and source code.

As I will cover this Post with live Working example to develop vue router previous route, so the vue router back button for this example is following below.

Also Read :  Vuejs settimeout and setinterval components Example

Vue this.$router.push in setTimeout

Simple We need to export an actual main Vue component.

<script>
  export default {
    created(){
      setTimeout( () => this.$router.push({ path: '/login'}), 5000);

    }
  }
</script>

html part

<template>
<div class="image">
  <img src="../assets/landing.png">
  <div class="loader loading"></div>
</div>
</template>

style.css
<style>
  .loading {
    border: 2px solid #dbdbdb;
    border-radius: 290486px;
    border-right-color: transparent;
    border-top-color: transparent;
    content: "";
    display: block;
    height: 1em;
    position: absolute;
    width: 1em;
    transform: translate(-50%,-50%);
    margin-right: -50%;
    top: 30%;
    left: 50%;
  }
</style>

Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Redirect page after delay using Vuejs.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Reply

avatar
  Subscribe  
Notify of