Openui5: Router with nested components does not propagate route parameters

Created on 30 Jul 2019  路  5Comments  路  Source: SAP/openui5

OpenUI5 version: 1.68.1

Browser/version (+device/version): Chrome V75

Any other tested browsers/devices(OK/FAIL):

URL (minimal example if possible): Repo Yelcho/UI5-Comp-Routing see branch

User/password (if required and possible - do not post any confidential information here):

Steps to reproduce the problem:

  1. Clone repo - use branch ui5_issue
  2. Select "Reuse Component 1" from LHS menu.
  3. Hash should be #/detail/test1

What is the expected result? I can't find a way to propagate the route parameters to the nested components' router

What happens instead? Nothing propagated.

image

Propagating route parameters to nested components seems to me like something that should be possible.

consulting

All 5 comments

upvoted for general confusion about nested routers

Hello @grahamrobbo ,

Thank you for sharing this finding. I've created an internal incident 1970427771. The status of the issue will be updated here in GitHub.

Regards,
Hristo

Hi @grahamrobbo,

the navTo method from sap.ui.core.routing.Router now provides an additional parameter oComponentTargetInfo with which you can give route information to the component targets which are loaded by this navTo call from UI5 version 1.72. The API documentation can be found here.

The version 1.72 isn't released yet but you can test this with the nightly build of openui5 already.

Best regards,
Jiawei

UI5 added a chapter in the development guide to explain how the new API can be used.

Based on the sample app which is contributed by @grahamrobbo, UI5 published a blog post to demonstrate what is running behind the sample application.

Was this page helpful?
0 / 5 - 0 ratings