angularjs
2016-07-27 62 views 2 likes 
2

搜索页

<p class="text-center" style="margin-bottom: 0px;"> 
    <button class="btn_1 green" ui-sref='tour_package.pickup-flights({destination: q_param.destination_city, departure_date_range: q_param.date_range})'><i class="icon-search"></i>Search now</button> 
</p> 

点击了下一个页面的搜索和头后,网址竟然是如此如此难看。

http://xxx/#/tour_package/2016~2F07~2F22%20-2016~2F07~2F25 

应该http://xxx/#/tour_package/2016/07/22-2016/07/25充分利用URL更具可读性

+0

你的状态码是什么样的? – austinthedeveloper

回答

0

我猜你的状态URL看起来像这样:

http://xxx/#/tour_package/{{destination}}/{{departure_date_range}}

你需要摆脱的 “/” 将其发送到前州。

转换 “2016年7月22日” 到 “2016年7月22日” 这样的URL就可以像:

http://xxx/#/tour_package/2016-07-22/2016-07-25

的 “/” 只是增加了混乱的URL。你只定义了2个状态参数,但多个“/”使它变为5.

+0

gotcha ~~非常感谢。 – user3675188

+0

如果这个答案对您有帮助,请将其加注或标记为正确。谢谢 – austinthedeveloper

相关问题