How can I use $state.go
to pass a query string into nested state routing?
Code:
.state('masterform', {
url: "/masterform?action&assetId&contentTypeId&folderid",
views: {
content: {
templateUrl: 'components/masterform/masterform.html',
controller: 'masterformCtrl as masterform'
}
}
})
.state('masterform.access', {
url: "/access",
views: {
content: {
templateUrl: 'components/masterform/access/access.html',
controller: 'accessCtrl as access'
}
}
})
Thanks.
You can simply pass query string parameters with second option of $state.go()
.
Like:
$state.go('masterform', {action:'Get', assetId:1234, folderId:999});