I have this rule in my app.js:
$routeProvider.when('/:language/rental-:type-:departure', {templateUrl: 'partials/rental.html', controller: 'itemCtrl'});
When user type a url like: /en/rental-houses-santa-cruz-tenerife
Then:
var type = $routeParams.type; # houses-santa-cruz
var departure = $routeParams.departure; # tenerife
When my expected result is:
type = houses
departure = santa-cruz-tenerife
Is there any way to achieve this?