javascript - Timeout and redirect on click -


i'm triying redirect page few seconds after submit. i'm using javascript , angularjs. i've found examples, didn't work. here's 1 of them:

vm.redirecttime = "1000";         vm.redirecturl = "destination url";          function redirect (){             settimeout("location.href = vm.redirecturl;", vm.redirecttime);                        } 

can me example, please?

the idea after submit show ng-show success message (wich working), , 5 or 6 seconds later, redirect page.

thanx in advance.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -

What is happening when Matlab is starting a "parallel pool"? -