What's the most concise way to read query parameters in AngularJS?
问题 I\'d like to read the values of URL query parameters using AngularJS. I\'m accessing the HTML with the following URL: http://127.0.0.1:8080/test.html?target=bob As expected, location.search is \"?target=bob\" . For accessing the value of target , I\'ve found various examples listed on the web, but none of them work in AngularJS 1.0.0rc10. In particular, the following are all undefined : $location.search.target $location.search[\'target\'] $location.search()[\'target\'] Anyone know what will