Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

How to configure the route in AngularJS when the url contains query parameters. I have to write a config for handling route with the url /states?statename=kar. I wrote the config as /states?statename=:name but its not working. Can you please help me where I am going wrong?

If it was /states/statename/kar then I would have written the route with /states/statename:name.

share|improve this question
    
this is what you are looking for: docs.angularjs.org/api/ng/service/$location#search –  Ronnie May 24 at 6:39
    
Thanks.This worked for me. –  Pradeep May 24 at 8:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.