javascript - AngularJS - Page redirecting to some other page in angular js while trying to get parameter from url -


here's controller code

.when('/showprofile/:userid', {       templateurl: 'resources/views/layout/showprofile.php',       controller: 'showordercontroller',      }) 

i passing parameter url.

i trying access page url directly this

http://192.168.1.58/myapp/#/showprofile/8

but redirecting me

http://192.168.1.58/myapp/#/showprofile/:userid

how can url value in view ?

here app.js , here authctrl.js

try in controller, return object based on url value can respected value this

//it return object  console.log($routeparams);    //get specific url value  console.log($routeparams.userid);     or  console.log($route.current.params.userid);


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -