I'm new to Backbone.js
and I'm experiencing routes
.
I set a route
, and navigating it through an input
with
route.navigate("stream")
I firstly created a router
:
app.Router = Backbone.Router.extend({
routes: {
"": "home",
"stream": "stream"
}
,initialize: function(){
}
,home: function(){
console.log("Home");
}
,stream: function(){
console.log("Streaming");
new app.streamView();
}
})
If I use the input
to navigate
to /stream
, and it works.
But, If I navigate to www.mysite.it/stream
it shows me 404
Error
. Any advice?