I can use javascript functions like window.location().But can also use $state.go and $state.transitionTo methods of angularjs.But using the angularjs $state service, the state doesnt reload everytime.I need to reload the state everytime the app enters that state through the angular ui router and the view should also be updated everytime.Do i have to use the more native window.location method? Please this is important as the $state service methods are not reloading the state everytime I followed the link Reloading current state - refresh data .But the inherit:false property value in the transitionTo method is not reloading the state everytime on my app end.Maybe it has to do something with cache.
What i want to achieve is that after editing a form it will go the listing state and show the updated values in that state which i updated through the form.But in that state it is still showing the previous values.ie. the state is not reloading everytime and the values are not updating everytime
This is the controller code:
EditUser.workat(company_form,$scope.userId).then(function(response){
console.log(response);
$scope.hide();
if(response.data.is_success) {
$scope.company_form = response.data.company_address_info;
//$state.go('about', {user_id: $scope.userId}, {reload: true});
$state.transitionTo('about', {user_id: $scope.userId}, {
reload: true,
inherit: false,
notify: true
});
}else{
$ionicPopup.alert({
title: 'Error',
content: response.data.message
});
}
});