I have a product list page, there have list of products,when click the particular products, call the function and in the function state.go.
Not working in dynamic:
$state.go('home.product.detail', { 'productID': "redminote4", 'brand': 'x', "store":"amazon" });
.state('home.product.detail', {
url: '/products/:?productID?brand?store',
views: {
'@': {
templateUrl: baseUrl + 'products/products',
controller: 'productsController'
}
},
data: {
displayName: '',
displayImg: 'Images/productsHeaderIcon.png'
}, resolve: {
param2: function (LoginHome) {
return LoginHome.getHomeService1();
}
}
**
Output weburl need to be:
productID=redminote4&brand=amazon&store=amazon:
other thing is value is getting in stateparams: eg) stateparams.productId=redminote but url not constructed **
working fine:
when i set the value in param i am getting the outputurl mentioned in above:
**function call:**
$state.go('home.product.detail', {
'productID': "redminote4", 'brand': 'x', "store":"amazon" });
App:
.state('home.product.detail', {
url: '/products/:?productID?brand?store',
params:{
'productID': "redminote4",
'brand': 'x',
"store":"amazon" }
},
views: {
'@': {
templateUrl: baseUrl + 'products/products',
controller: 'productsController'
}
},
data: {
displayName: '',
displayImg: 'Images/productsHeaderIcon.png'
}, resolve: {
param2: function (LoginHome) {
return LoginHome.getHomeService1();
}
}
why the url not formed in dynamic?