-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
"Root" not enforced in Y.Router #1083
Labels
Comments
This enforcement behavior should probably be configurable, since some users may what to use a sort of relative linking |
ghost
assigned ericf
Aug 16, 2013
@carystanley makes sense, I'll look into how we can make |
ericf
added a commit
to ericf/yui3
that referenced
this issue
Sep 16, 2013
This enforces routers with a specified `root` to only consider paths as matching its route handles if that path is semantically within the router's `root` path. For example: router.set('root', '/app/'); router.hasRoute('/app/'); // => true router.hasRoute('/app/foo'); // => true router.hasRoute('/bar/'); // => false This change fixes some issues with paths being erroneously considered matching even when they were not semantically within the router's `root` path. The `getPath()` method now returns the _full_ current path, whereas before it returned the current path relative to the router's `root`. These changes will break backwards compatibility with some apps, but fix some fundamental issues with how Y.Router handled `root` paths. Fixes yui#1083
This was referenced Sep 16, 2013
Merged #1198 into |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I use Y.Route with a base, then I expect the router only to work for urls that are in that base. If I have a root "/myapp/" then when a user clicks on a link "/", I want that to leave the app and navigate to the base of the website, not the base of my applet.
removeRoot only strips the the root if it exists, I think it should enforce the root, so that I can have both links that navigate within the app, as well as links that can naviagte outside the app
The text was updated successfully, but these errors were encountered: