0
안녕하세요. 백본 페이지를 만들고 컨트롤러를 사용하여 일부보기를 활성화합니다.백본은 f5로 새로 고침을 유지합니다.
내가이 컨트롤러를 가지고 :
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이 같은 몇 가지가 있습니다
.../웹/index.html을 # 당신의
및 F5 키를 누르면 웹 브라우저에 다음과 같이 쓰게됩니다.
.../web/index.html #
내 질문은 내가 f5 키를 눌러도 URL의 가치를 어떻게 유지할 수 있습니까?
감사합니다.
그런 문제가 없었습니까 ... 어떤 브라우저를 사용합니까? –
나는 fedora에서 Chrome을 사용합니다. 17 –
Backbone.history.start ({pushState : true}); – opengrid