0
주 파일이 (1), (2), (3)처럼 보이는 응용 프로그램이 있습니다. (이 #page
을 유발하기 때문에)백본 라우터 ... URL 처리 방법
Backbone.Router이 경우 잘 작동 :
http://localhost/index.php/some#page
: URL이 (
/some#page
를 트리거하기 위해) 다음의 경우
http://localhost/index.php#page
가 어떻게 그것을 구성해야
PS :
이 웹 응용 프로그램의 백엔드
Synfony2 을 사용하고 있습니다
(1)
// index.php
<script data-main='mainApp.js' src='require.js'>
(2)
// mainApp.js
define([
'js/router'
], function(Router) {
"use strict";
var initialize = function()
{
Router.initialize();
}
return {
initialize: initialize
};
});
(3)
// router.js
define([
'myView'
], function(MyView){
console.log(MyView)
var AppRouter = Backbone.Router.extend({
routes: {
'page' : 'view'
},
view: function() {
//some code
}
});
});
고맙습니다. –
@LorraineBernard : 달콤한! –