从angular 7应用程序路由到其他应用程序

时间:2019-08-04 16:39:52

标签: routing angular7

我正在针对生产环境进行有角度的应用程序。我有两个应用程序部分,一个部分是用angular js编写的,另一部分是用angular 7编写的。我想从angular 7导航到网址段“ a / b / c”(此页面的代码是用angular js编写)码。我已经在module.ts中指定了路由。 我正在使用Router.navigateByUrl('xyz'),但无法导航。

此外,在导航是否需要其他端口时如何指定端口号?

const appRoutes: Routes = [
  { path: 'xyz', redirectTo: 'a/b/c' },
];

I expect it to be navigated to the url 'a/b/c' but it says that it cannot find the path 'xyz'.

0 个答案:

没有答案