Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 如何使状态提供程序捕获所有URL及其查询参数_Angularjs_Angular Ui Router - Fatal编程技术网

Angularjs 如何使状态提供程序捕获所有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

假设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为:

$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',
        })

我真的需要包括所有查询参数。所以不仅仅是“用户”,事实上,我需要包含所有的查询参数。所以,不仅仅是“用户”,事实上,这是一个包罗万象的问题*