This repository has been archived by the owner on Jun 15, 2023. It is now read-only.
Split params into params and routing options #248
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…pting arguments.
…cs/backbone-options
Whitelist navigate options in changeURL Comments
…equirejs/wiki/Upgrading-to-RequireJS-2.1) Style and consistency changes
Simplify changeURL options tests
|
…roller: add options hash
This needs more testing anyhow since I just discovered a problem that wasn’t caught by the specs. |
Test that redirectTo throws an exception
Test for routing options on !router:route Test for protocol-relative URLs Style changes
Test routing options more properly Improve check if Backbone history was stopped Remove duplicate test, merge into one Renamed variables for consistency
Okay, now it should be ready for prime time. |
Maybe it’s a good idea to support the old |
Looks good for me. Will merge in a bit, after testing locally. Backwards-compat is okay here. |
the travis build still fails |
paulmillr
added a commit
that referenced
this pull request
Nov 28, 2012
Split params into params and routing options
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#230 with several changes:
path
also to the routing options to allow for apath
param. Does this make sense?BEWARE, this will introduce a API-breaking changes. The new signatures are:
Flags that control the routing (like
forceStartup
,changeURL
, trigger/replace) and information from the router (path
) have to be added to the new options hash. Formerly, they were part of theparams
hash which could introduce conflicts with real URL or query string parameters.TO BE DISCUSSED:
I’m not sure if it makes sense to make this change in a backwards-compatible way. This would introduce a lot of ugly code. We never claimed that Chaplin’s API is stable and I think we should make this cut as early as possible. It’s a bit cumbersome to have a second hash, but internal routing information like
path
shouldn’t be part ofparams
before the routing/controllers API is getting stable.