question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Router with nested components does not propagate route parameters

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
stopcodercommented, Feb 6, 2020

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.

1reaction
stopcodercommented, Nov 19, 2019

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enabling Routing in Nested Components - SAPUI5 SDK
Every SAPUI5 component can define routing configuration in its manifest and a UI5 ... no titleChanged event will be propagated from the nested...
Read more >
How to implement nested routes with React Router
With React Router, you can create nested routes with parameters. React Router uses nested routes to render more specific routing information ...
Read more >
React Router and nested routes - Kevin Farrugia
In my own words, a nested route is a region within a page layout that responds to route changes. For example, in a...
Read more >
UI5er Buzz #46 – Routing with Nested Components - SAP Blogs
In this blog post, I would like to give you an overview of some new routing features and demonstrate how you can leverage...
Read more >
Passing Data Between Route and Nested Route in React
If you can't pass something via props, and it cannot be derived by the route params, you'd use context instead.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found