我的app.js中有这样的规则:
$routeProvider.when('/:language/rental-:type-:departure', {templateUrl: 'partials/rental.html', controller: 'itemCtrl'});当用户键入url:/en/rental-houses-santa-cruz-tenerife时
然后:
var type = $routeParams.type; # houses-santa-cruz
var departure = $routeParams.departure; # tenerife当我的预期结果是:
type = houses
departure = santa-cruz-tenerife有办法做到这一点吗?
https://stackoverflow.com/questions/33762920
复制相似问题