2017-12-19 4 views
-1

나는변경 URL 사용 backbone.js

http://localhost/src/index.html#test_module

URL 내 백본 모듈을 볼 수 있습니다. 는하지만

같은 다른 모듈을 볼 필요가

http://localhost/src/index.html#test_module/another_module

참고 :

내 백본보기 Backbone.history.navigate(another_module, {trigger:true}); 사용

그러나 그것은 나에게

http://localhost/src/index.html#another_module

같은 URL을 제공합니다
+0

[백본에서 라우팅이 작동하는 방식] (https://stackoverflow.com/a/39442604/1218980), _spoiler 경고 : 링크 일뿐입니다 ._ –

답변

1

왜 이렇게 해보지 않으시겠습니까?

Backbone.history.navigate("test_module/another_module", { trigger: true }); 

자세한 내용은 documentation on navigate을 참조하십시오.

-1

백본을 사용하여 개발하는 동안 Backbone Routers을 최상의 parctice로 사용해야합니다. 문서를 통해 더 잘 이해할 수 있습니다.

관련 문제