angular routing - AngularJS routeProvider when hash sign is present -


i have app hosted on iis. app url http://localhost/tool

when load page typing in url, url path changes

http://localhost/tool#/tool

i don't have in $routeprovider config. process url request like,

http://localhost/tool#/request/:param1/:param2 or if possible http://localhost/tool#/request?param1=value&?param2=value

how write $routeprovider configuration?

further in situation, user needs direct url state of page user may not start http://localhost/tool start http://localhost/tool#/request/:param1/:param2.

please help.

i think possible have url localhost/tool#/request?param1=value&?param2=value :

angular.module('myapp').     config(         ['$routeprovider', function($routeprovider){                 $routeprovider.                     when('/tool', {templateurl: './view/partial/tool_list.html', controller: toollistctrl}).                     when('/tool/:param1/:param2', {templateurl: './view/partial/tool_details.html', controller: tooldetailctrl}).                      otherwise({redirectto: '/tool'}); //here can redirect whatyouwanturl         }         ]); 

you find informations need here: http://docs.angularjs.org/tutorial/step_07


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -