-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fixing documentation issues #211
Conversation
This includes the following documentation - deparam - isCurrent - link - param - url All documentation is avaliable in the doc folder.
…209-documentationIssues
- currentRule.md - deparam.md - isCurrent.md - link.md - param.md - url.md
`doc/currentRule.md` needed major updates to the signature example so it would work. This includes starting the route and adding Timeouts. Other changes are minor refactoring to improve over all consistency.
…ing in link and url.
@@ -49,7 +49,7 @@ without changing the page. | |||
|
|||
This provides the basics needed to | |||
create history enabled single-page apps. However, | |||
`route` addresses several other needs aswell, such as: | |||
`route` addresses several other needs as well, such as: | |||
|
|||
- Pretty urls. | |||
- Keeping routes independent of application code. |
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.
Setup and teardown
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 already mentions setup and teardown of Widgets - line 57. Should we mention something else?
For your convenience here's the full list:
- Pretty urls.
- Keeping routes independent of application code.
- Listening to specific parts of the history changing.
- Setup / Teardown of widgets.
doc/link.md
Outdated
@@ -0,0 +1,58 @@ | |||
@function can-route.link link | |||
@parent can-route.static |
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.
move into a deprecated
group.
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 added deprecate .link() to #209 and put a deprecation warning on the page. Even adding a group for deprecated/can-route.deprecated and setting the group as can-route.link's parent didn't seem to work.
|
||
@return {String|undefined} Returns the [can-route.register registered] routing rule | ||
that best matches the provided url. If no rule matches, `undefined` is returned. | ||
Returns a string that best matches the provided 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.
it's not quite the full url I think. We should probably call this a url fragment. We really should give people a way to get the "matched" part of the url. Can you create an issue for this?
route.urlFragment("http://foo.com/bar?zed=ted#!todoId=1") //-> "todoId=1"
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.
It would be good to give a use case for this. I'm not sure why it got added. I bet searching for matchedRule
on github might discover it. Or ask folks at Bitovi why they might use it. Generally speaking, you should be able to use the properties to figure out what page you are on. For example, see if there is a route.data.recipeId
.
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.
- issue Rename
route.url
toroute.urlFragment
. #215 created to rename route.rule to route.urlFragment
This includes removing examples that have been deemed redundant.
- There were some issues creating a deprecated group in can-route.md. Added to #209.
Fixes most of the issues #209
can-route.html
route.data
to HTMLElements.can-route.start.html
can-route.stop.html
mock-url
can-route.currentRule.html
can-route.deparam.html
mock-url
can-route.isCurrent
@description
.agains
->against
can-route.link.html
&
.can-route.param.html
can-route.url.html
can-route.data.html