0
가 갖는 작동하지 않습니다 -backbone.js 라우터 - 간단한 예제
default.html을
<html>
<head>
</head>
<body>
<script src="jquery-2.1.0.min.js"></script>
<script src="json2.min.js"></script>
<script src="underscore.js"></script>
<script src="backbone.js"></script>
<script>
Router = Backbone.Router.extend({
routers: {
"*action" : "func"
},
func: function (action) {
console.log(action);
}
});
new Router();
Backbone.history.start();
</script>
</body>
</html>
는 #
후 console
에 접미사를 인쇄 할 수있는 routers
형식에 따라.
예를 들어 경로 default.html#hello
의 경우 console
에 hello
을 인쇄해야하지만 실제로 인쇄되지는 않습니다.
무엇이 잘못 되었나요?
죄송합니다 ... 감사합니다. – URL87