How to redirect current page to other URL depending on current URL? -




i want check current url , if not home page, want redirect page particular url using jquery or angularjs

[angular] try following lines of code:

       var   location = $location.path();                    location = location.slice(1, location.indexof("/"));         location = location.tolowercase();           if (location != 'home') {                           $location.path('/redirect/somewhere');         } 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -