Aware that there are a lot of questions on the same issue but none of them have worked. Have already tried setting pushState true and hashChage false but every time the route gives me Cannot Get error. Here's my routes file
var appRouter = Backbone.Router.extend({
routes:{
"login":"login"
},
login:function () {
var LoginView = Backbone.View.extend({
initialize: function () {
this.render();
},
render: function () {
var that = this;
$.get('templates/login.html', function (data) {
template = _.template(data, {});
that.$el.html(template);
}, 'html');
}
});
var loginView = new LoginView({ el: $("#test") });
},
});
var sys = new appRouter();
Backbone.history.start({pushState:true});