Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/32.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
HashLocationStrategy中缺少angular2查询字符串_Angular - Fatal编程技术网

HashLocationStrategy中缺少angular2查询字符串

HashLocationStrategy中缺少angular2查询字符串,angular,Angular,当我使用PathLocationStrategy时, 很好 当我使用HashLocationStrategy时,请访问 url总是重定向到,并且错过查询字符串?cc=1111 我的演示代码 =============已更新=========== 我现在知道我的错误了 我访问的url是 @甘特斯切鲍尔 非常感谢 正确的url是 ----我的另一个问题------ 当我访问时,我以为它会重定向到,但实际上它会重定向到 我现在知道我的错误了 我访问的url是 @甘特斯切鲍尔 非常感谢 正确的ur

当我使用PathLocationStrategy时, 很好

当我使用HashLocationStrategy时,请访问 url总是重定向到,并且错过查询字符串
?cc=1111

我的演示代码

=============已更新=========== 我现在知道我的错误了

我访问的url是

@甘特斯切鲍尔

非常感谢

正确的url是

----我的另一个问题------ 当我访问时,我以为它会重定向到,但实际上它会重定向到

我现在知道我的错误了

我访问的url是

@甘特斯切鲍尔

非常感谢

正确的url是

我相信这通常是可行的。请提供有关您的配置(路由、重定向、防护等)的更多信息。该项目没有
apples
路由。导航到
http://localhost:3000/#/dashboard/123?cc=1111
http://localhost:3000/index.html/#/dashboard/123?cc=1111
?@GünterZöchbauer非常感谢。我现在知道我的错误了。
const routes: Routes = [
  {
    path: '',
    redirectTo: '/dashboard',
    pathMatch: 'full'
  },
  {
    path: 'dashboard',
    component: DashboardComponent
  }
]