Clarification on optional parameters and trailing slashes in routes documentation

This commit is contained in:
Alex McPherson
2013-03-28 11:44:55 -06:00
parent dc2521dc8c
commit 81585a08fb

View File

@@ -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