Adding in a note about Backbone.history.start() returning a boolean for whether or not a match has been found in the current URL fragment. Thanks to XiXora for the recommendation.

This commit is contained in:
Samuel Clay
2011-04-25 13:07:35 -04:00
parent f44cfeeb36
commit a00b798318

View File

@@ -1553,6 +1553,12 @@ openPage: function(pageNumber) {
and all of the routes are set up properly, call <tt>Backbone.history.start()</tt>
to begin monitoring <tt>hashchange</tt> events, and dispatching routes.
</p>
<p>
When called, if a route succeeds with a match for the current URL,
<tt>Backbone.history.start()</tt> returns <tt>true</tt>. If no defined
routes matches the current URL fragment, it returns <tt>false</tt>.
</p>
<pre>
$(function(){