mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-30 03:00:06 -04:00
Clarification on optional parameters and trailing slashes in routes documentation
This commit is contained in:
@@ -2183,6 +2183,13 @@ var Workspace = Backbone.Router.extend({
|
||||
and <tt>"installing"</tt> to the action in the second.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Trailing slashes are treated as part of the URL, and (correctly) treated
|
||||
as a unique route when accessed. <tt>docs</tt> and <tt>docs/</tt> will fire
|
||||
different callbacks. If you can't avoid generating both types of URLs, you
|
||||
can define a <tt>"docs(/)"</tt> matcher to capture both cases.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When the visitor presses the back button, or enters a URL, and a particular
|
||||
route is matched, the name of the action will be fired as an
|
||||
|
||||
Reference in New Issue
Block a user