0
我跟随this tutorial。这是我发现测试路由的唯一现代示例。我希望能够使用模拟组件。可悲的是,the delivered plunker不起作用。路由测试 - Location.path()总是返回空“”
路由器:应用程序导航到 “” 您重定向到/ home
预计'是 '/家'。
和
路由器:应用程序导航到 “搜索” 把你带到/搜索
预计'是 '/搜索'。
有同样的问题,如果我更换:
imports: [ RouterTestingModule.withRoutes(routes)] //by
imports: [ RouterModule.forRoot(routes)]
你们是否有一些想法?