【发布时间】:2019-10-31 08:46:13
【问题描述】:
我已经构建了一个新的 Angular7 应用程序,并且本地 Angular 应用程序运行良好。 现在我需要从基于 Java/JSP 构建的现有遗留 Web 应用程序启动我的 Angular 应用程序。 在现有的遗留应用程序中,我有一个 URL。单击该 URL 后,应打开 Angular 应用程序。
但是每当我点击 URL 时,似乎路由没有正确地发生在 Angular 应用程序中。
本地 Angular 应用程序正在成功运行 - http://localhost:4200/alerts;alerttype=renewals;cor=411119
到目前为止我所做的, 我已将 angular dist 文件夹复制到旧版应用程序的 webcontent 文件夹中,并按如下方式运行应用程序
http://localhost:9086/customer/eWeb/AlertApp/alerts;alerttype=renewals;cor=411119
app.routing.module.ts
const routes: Routes = [
{ path: 'alerts', component: AlertsComponent },
{ path: 'customer/eWeb/AlertApp/alerts', component: AlertsComponent
},
];
谁能帮助并告诉如何从遗留应用程序启动角度应用程序?需要配置什么所有路由?
提前致谢。
【问题讨论】:
标签: angular angular-ui-router angular7-router