简体   繁体   English

如何根据来自不同应用程序的 url 参数配置路由。

[英]How to configure route on the basis of url parameters from different application.

There are 5 links on java application, when user click on those, then each link will open each angular form on the basis of parameters passed on those links. java应用程序有5个链接,当用户点击这些链接时,每个链接将根据这些链接传递的参数打开每个角度表单。 How do I configure my route for this scenario in angular.我如何在 angular.js 中为这个场景配置我的路线。

Okay so this scenario you can implement with below steps :好的,您可以通过以下步骤实现此场景:

In your application create all 5 routes which are required, pass that route name in your links in a parameter.在您的应用程序中创建所有 5 条必需的路由,在参数的链接中传递该路由名称。

In your Java Application: create all 5 URLs Like :在您的 Java 应用程序中:创建所有 5 个 URL,例如:

http://youapplication.com/authenticate?name=routeName http://youapplication.com/authenticate?name=routeName

So here Authenticate is predefined component & routes in my application so all links will throw on the same route and inside ngOnInit method based on parameter Name we will redirect to that routes.所以这里 Authenticate 是我的应用程序中预定义的组件和路由,因此所有链接都将在同一路由上抛出,并且在基于参数 Name 的 ngOnInit 方法中,我们将重定向到该路由。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Angular应用程序根URL上配置route参数 - How to configure route parameter on Angular application root URL 如何使用 URL 中的参数路由到组件 - How to route to the components with the parameters in the URL 我想通过将查询参数传递到接收到的thos参数并从中开发出url来路由到外部Angular应用程序 - I want to route to external Angular application by passing query parameters to received thos parameters and developed the url from that 如何从angular2应用中的网址获取路线参数? - How to get route parameters from a url in angular2 app? 使用URL重写从响应中删除服务器标头不适用于非ASP .net应用程序。 - Remove Server header from response using URL rewrite not working for non ASP .net application. 如何从 Angular 应用程序中的 URL 片段中检索参数? - How to retrieve parameters from URL fragment in Angular application? 角:如何从同一组件路由-参数? - Angular: how to route -parameters from same component? 如何在angular4的下拉菜单中进行路由? - How to route on the basis of dropdowns selection in angular4? Angular2:如何通过更改一些路由参数导航到新的 url? - Angular2: How to navigate to an new url with changing some route parameters? 导航到具有不同参数的相同路线 - Navigating to the same route with different parameters
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM