Angularjs 如何使状态提供程序捕获所有URL及其查询参数
假设url是:Angularjs 如何使状态提供程序捕获所有URL及其查询参数,angularjs,angular-ui-router,Angularjs,Angular Ui Router,假设url是: $stateProvider .state('all', { /* This matches any url, and exposes the path to $stateParams with the name myPath */ url: 'myPath*', resolve: { ... "something/blah" $stateParams包含整个查询 但当url为: $statePr
$stateProvider
.state('all', {
/* This matches any url, and exposes the path to $stateParams with the name myPath */
url: 'myPath*',
resolve: {
...
"something/blah"
$stateParams
包含整个查询
但当url为:
$stateProvider
.state('all', {
/* This matches any url, and exposes the path to $stateParams with the name myPath */
url: 'myPath*',
resolve: {
...
"something/blah"
$stateParams
仅包含原始url部分“something/blah”
我如何才能使它确认url是不同的,即使是基于查询参数
"something/blah?user=blah"
尝试一下,现在可以在控件中使用$stateParams
$stateProvider
.state('all', {
url: 'something/blah?user',
})
尝试一下,现在可以在控件中使用$stateParams
$stateProvider
.state('all', {
url: 'something/blah?user',
})
我真的需要包括所有查询参数。所以不仅仅是“用户”,事实上,我需要包含所有的查询参数。所以,不仅仅是“用户”,事实上,这是一个包罗万象的问题*