olivernn / davis.js

RESTful degradable JavaScript routing using pushState
http://davisjs.com
532 stars 58 forks source link

Cannot navigate within routes and manually to update URL #92

Open rossthedevigner opened 10 years ago

rossthedevigner commented 10 years ago

Is there not currently a way to navigate within a set of routes? For example;

var app = Davis(function () { this.get('/video/:videoID', function (req) { alert("Hello " + req.params['name']) }) }) app.start();

Then within my code, say after a video has stopped playing, I want to navigate to a new route and trigger the callback.

app.route.navigate(/video/dk59u8);

That would change the URL, update the history stack, and trigger the call back function based on the route pattern.

Is this currently possible?