-
Notifications
You must be signed in to change notification settings - Fork 174
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
Dynamic pathSegments in navigation Nodes #104
Conversation
… viewUrl, added some documentation and example implementation, overview link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added just two small tiny bits of comments.
docs/lifecycle.md
Outdated
- **getEventData()** returns the context object. Usually it is not required as the **addContextUpdateListener** receives the same values. | ||
- **getPathParams()** returns the dynamic path parameters of the active url. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
URL
docs/navigation-configuration.md
Outdated
@@ -64,7 +65,7 @@ window.Luigi.setConfig({ | |||
|
|||
## Nodes | |||
|
|||
- **pathSegment** specifies the partial URL of the current segment. A static settings example reflects `luigidomain.test/settings`, while a dynamic one loads on any other value. | |||
- **pathSegment** specifies the partial URL of the current segment. A static settings example reflects `luigidomain.test/settings`, while a dynamic, prefixed with colon, loads on any other value. **pathSegments** must not contain slashes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a dynamic one, prefixed with a colon,
…to feature/dynamic-nodes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* initial dynamic node implementation. substitution for pathSegment and viewUrl, added some documentation and example implementation, overview link * removed obsolete routes and component, added child node to dynamic node example * added context substitution and enhanced config and example * added test for findMatchingNode * small fix for undefined param * removed # from tets, added navigation tets for findMatchingNode * documentation updates * refactored handling of falsy dynamic nodes, updated tests
Description
Added possibility to add dynamic nodes. pathSegments prefixed with colon (:) will be substituted in pathSegment, viewUrl and context and are available as LuigiClient.getPathParams().
Related issue(s)
Resolves #94