I am trying to build state provider that catch multi params but the issue is that i dont know how many params is it possible to catch them as object or array? or the only solution is to catch it as string and separate them?
for example this is my provider
.state('app.confirmPayment', {
url: '/comfirmPayment/:params',
templateUrl: '/Views/ConfirmPayment.html'
})
and controller
app.controller('ConfirmController', ['$scope', '$state',
function ($scope, $state) {
var self = this;
console.log('$state confirm payment');
console.log($state);
console.log('$state confirm payment');
}
]);
and want to catch all the params separated
/comfirmPayment/:age=15&name=erez..... // can be more that i dont know
and can be more params that i dont know what they can be
thanks hope its clear
Unless you're binding to the query parameters (see the documentation), you don't access them directly through
$stateor$stateParams.Suppose the url
and You can handle this in your router config
$stateProviderwhere you define statesand finally You can have these parameters in the citiesController.js i.e
Hope it helps.