<form class="f" method="POST" action="/backtoNode">
1.in app.js file
server.post('/backtoNode', (request, responce)=>{
responce.render('page');
});
2。在router.js中
module.exports=define(["jquery", "underscore","backbone", "/public/javascripts/client_View/view.js"], function($, _, Backbone, fsfile){
var aa= Backbone.Router.extend({
routes: {
":page" : "app"
},
app:function(){
console.log("inside route");
var a = new fsfile;
a();
}
});
var initialize = function () {
var aaa = new aa();
Backbone.history.start();
}
return{
intialize: intitialize
};
});
3.如何使用app.js路由router.js 4.如何使用app.js
在我的页面中获取页面路径