Angular2:url中的双斜杠

时间:2016-07-01 12:55:52

标签: angularjs angular angular-ui-router router routeconfig

父组件:App

@RouteConfig([
   {
     path: '...',
      name: 'Home',
     component: HomeCmp
   },
   {
    path: '/404',
    name: 'NotFound',
    component: Error404Cmp
    },
   {
    path: '/*path',
    redirectTo: ['NotFound']
   }
  ])

主页组件:主页

 @RouteConfig([
  {
     path: '',
     name: 'ItemsList',
     component: itemsListCmp,
     useAsDefault: true
  },
  {
    path: 'item/:id/',
    name: 'ItemInfo',
    component: itemInfoCmp
   }
  ])

当我在url中重定向到ItemInfo路径时,我有下一个:

http://localhost:9000/#//item/1

为什么在url双斜线"#//"?我该如何解决它并获得: http://localhost:9000/#/item/1

感谢。

0 个答案:

没有答案
相关问题