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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -