-
Notifications
You must be signed in to change notification settings - Fork 33
Conversation
docs/routing/index.md
Outdated
|
||
With **targets**, you define where a view or a component is loaded and where the view or component is shown on the UI. By referring to one or multiple targets in a route's definition, you can load and show the views or components once the route's pattern matches the current hash. | ||
|
||
It is best practice to configure the routing in the descriptor file (`manifest.json`) while it is also possible to do it in the `Component.js` file or locally by calling the constructors of the classes, for example under the `sap.ui.core.routing` and `sap.m.routing` namespaces. |
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.
even though technically true of course, i find the bare mention of the non-manifest options rather confusing to the reader. so IMHO i'd either elaborate on both (component, sub-classed routing) in configuration
or similar
docs/routing/configuration.markdown
Outdated
title: Configuration | ||
name: configuration | ||
parent: Routing and Navigation | ||
nav_order: 3 |
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.
I'd suggest to make this the first sub-nav item after index: config is essential before anything :)
@@ -0,0 +1,71 @@ | |||
--- |
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.
all of the route pattern items need a code exmaple IMO - it's really difficult for the reader to translate the prose to code him-/herself
|
||
</div> | ||
|
||
## Config |
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.
same comment as in patterns
: this needs code example to make it "visible" for the reader what the options are all about
docs/routing/methods.markdown
Outdated
|
||
## Methods | ||
|
||
Navigation can be triggered by method the [navTo](https://sapui5.hana.ondemand.com/#/api/sap.ui.core.routing.Router%23methods/navTo){:target="_blank"} on `sap.ui.core.routing.Router`. |
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.
the method
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.
also, try using https://ui5.sap.com
as the documentation domain - b/c reasons, you know ... :)
docs/routing/methods.markdown
Outdated
|
||
Navigation can be triggered by method the [navTo](https://sapui5.hana.ondemand.com/#/api/sap.ui.core.routing.Router%23methods/navTo){:target="_blank"} on `sap.ui.core.routing.Router`. | ||
|
||
You can use a generic navTo method in your BaseController and call it from any controller within your applicataion: |
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.
typo "application"
|
||
return Controller.extend("myApp.controller.BaseController", | ||
|
||
navTo: function(sName, oParameters, oComponentTargetInfo, bReplace) { |
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.
what about ES6-ing things, à la:
sap.ui.require(..., (Controller) => {
navTo(sName, oParameters, ...) { }
})
but this just a hint, not a necessity :)
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.
I personally would also prefer always programming ES6, but still a lot of customers I have require apps to also run in IE. Hence I always provide examples in ES5 style.
|
||
### RouteMatched | ||
|
||
The routeMatched event is fired if a pattern of any route in the routing configuration is matched. |
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.
code fence routeMatched
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.
and: the code example shows the handler for the patternMatched
event, not the routeMatched
}); | ||
``` | ||
|
||
### Matched |
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.
this is actually the routeMatched
event, right? (see above)
docs/routing/titles.markdown
Outdated
|
||
## Titles in Targets | ||
|
||
Routing in SAPUI5 allows you to define titles declaratively in the configuration. The title can be set with valid binding syntax which is then resolved under the scope of the target to which it belongs. This means that the title can be translated when it’s bound to the i18n model or resolved dynamically under the current binding context. |
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.
supercool!
Hi @hkaintz |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
I have read the CLA Document and I hereby sign the CLA |
Hi @hkaintz you can try this to rewrite the commits. If it fails you can |
@marianfoo Ich habs gerade mit git rebase versucht, hat leider nicht funktioniert. Die neuen commits haben zwar den richtigen User, aber die Alten sind immer noch da. |
I have read the CLA Document and I hereby sign the CLA |
Hi @hkaintz, ja wir können für diesen Fall trotzdem mergen. Mit deinen GitHub User hast du ja unterschrieben. |
feat: initial commit for routing fix: removed non-manifest routing options fix: changed nav order of confi chapter feat: added examples for patterns feat: added example for config fix: minor fixes fix: changed user fix: changed user feat: initial commit for routing fix: removed non-manifest routing options fix: changed nav order of confi chapter feat: added examples for patterns feat: added example for config fix: minor fixes fix: changed user fix: changed user
@hkaintz fixed Error with "CLA Assistant" by sqashing your commits into one |
No description provided.