こんにちは、私はバックボーン ページを作成しており、コントローラーを使用していくつかのビューをアクティブにしています。
私はこのコントローラーを持っています:
var AppRouter = Backbone.Router.extend({
routes: {
"":"main",
"your":"yourpost",
"random" : "randompost",
"featured" : "featuredpost",
"sponsored" : "sponsoredpost",
"post/:pos" : "post",
},
main : function () {
console.log("MAIN_VIEW");
main_view.render();
},
yourposts : function () {
console.log("YOUR_VIEW");
yourpost.refresh();
yourpost.render();
},
...
// Instantiate the router
var app_router = new AppRouter();
// Start Backbone history a neccesary step for bookmarkable URL's
Backbone.history.start();
URLに次のようなものがある場合:
.../web/index.html#あなたの
F5 キーを押すと、Web ブラウザは次のように書き込みます。
.../web/index.html#
私の質問は、f5 を押したときに URL の値を保持するにはどうすればよいですか?
ありがとう!