【发布时间】:2013-08-14 11:26:27
【问题描述】:
我已经使用带有几个路由的主干.js 设置了一个 Express 服务器,我正在尝试使用 req.params 通过 url 捕获信息。
我已经用适当的路由设置了我的服务器
app.get( '/route/:first/:second', router.routeHandler );
使用我的快递服务器,当我输入这样的网址时:
http://localhost:3000/route/firstVar/secondVar
我收到了返回给我的原始 JSON,但是当我尝试这样的 url 时:
http://localhost:3000/#route/firstVar/secondVar
它实际上会将 html 和 CSS 渲染到页面。那里发生了什么?我可以改变这种行为吗?那个设置在哪里?
【问题讨论】:
标签: node.js backbone.js express routes