0
我跟隨this tutorial。這是我發現測試路由的唯一現代示例。我希望能夠使用模擬組件。可悲的是,the delivered plunker不起作用。路由測試 - Location.path()總是返回空「」
路由器:應用程序導航到 「」 您重定向到/ home
預計'是 '/家'。
和
路由器:應用程序導航到 「搜索」 把你帶到/搜索
預計'是 '/搜索'。
有同樣的問題,如果我更換:
imports: [ RouterTestingModule.withRoutes(routes)] //by
imports: [ RouterModule.forRoot(routes)]
你們是否有一些想法?