Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is not possible to have a root node with empty path segment and a view #299

Conversation

pekura
Copy link
Contributor

@pekura pekura commented Dec 18, 2018

It's not possible to set the root node's path segment as an empty string or a slash - fix.

Copy link
Contributor

@dariadomagala-sap dariadomagala-sap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change browser doesn't crash but I get a popup with an error Could not map the exact target node for the requested route. It happens on each route, not only this main one.

@pekura
Copy link
Contributor Author

pekura commented Dec 18, 2018

OK, maybe the navigation structure you provide is not as expected. This only works if you provide the nodes not as an array but as a single root node object (with children) where pathSegment is set to empty string. Maybe you provide an array (as we always had it like that in our examples, but now you can actually specify the tree from the root node (which is only one and that is why it may not be an array)).

@dariadomagala-sap
Copy link
Contributor

@pekura You are right. Unfortunately I need an additional node in the top-navigation, so I need to have two main nodes, and because of that it won't work for me.

@dariadomagala-sap dariadomagala-sap self-assigned this Dec 19, 2018
Copy link
Contributor

@dariadomagala-sap dariadomagala-sap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jesusreal jesusreal self-assigned this Dec 19, 2018
Copy link
Contributor

@jesusreal jesusreal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created this patch diff-proposal.zip and when navigating to http://localhost:4200 this is what I get
screen shot 2018-12-19 at 17 48 04
What am I testing wrongly?

core/src/navigation/services/navigation.js Outdated Show resolved Hide resolved
Copy link
Contributor

@jesusreal jesusreal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after last changes

@maxmarkus maxmarkus added area/luigi bug Something isn't working labels Dec 21, 2018
@kwiatekus kwiatekus merged commit ddcb153 into SAP:master Dec 27, 2018
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
…view (SAP#299)

It is not possible to have a root node with empty path segment and a view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants