When passing $stateParams through $state.go it is getting correctly when i click the link directly, but getting null after page refresh or open through another window.
I have the following function:
$scope.urlvalues = function(url,page) {
var result = {url:url, page:page};
$state.go("detailpage", result);
}
And my state looks like this:
.state('detailpage', {
url: "/page/overview",
templateUrl: "/page_details.html",
controller: "PageDetailsController",
params: {
url: null,
page: null
},
})
Thanks in advance.
Can you try:
.state('detailpage', {
url: "/page/overview/:url/:page",
templateUrl: "/page_details.html",
controller: "PageDetailsController",
})
Then, when you go to the page the url will be set and will be there when you refresh.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With