I have this route to go to news details view by passing news id using params.. its working fine .. but when i refresh the view its losing the data in the view ..
.state('news', {
url: '/news/:slug/',
templateUrl: 'news-details.html',
controller: 'NewsController as newsVm',
params: {
id: null
},
})
i found solution by using url: '/news/:slug/:id' and remove params:{id: null} but in this case the id will be showing in the url and my client request to remove it.
this is how im calling the route in my controller when they click on the news link
$state.go('news', {id: articleId, slug: articleSlug});
i think this is happend because the $state.go is not refreshing the controller .. im not sure