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