Help to refresh screen ionic framework

0

I have a Windows.Location.reloaded() and when it does it sends me to the screen of login or does it change my screen, does anyone know how I can solve it?
I hope you can help me. Thanks

    
asked by Sebastian Balmaceda 03.08.2017 в 18:24
source

2 answers

0

Hi Sebastian, you can use the following method $ state.reload, I'll give you an example and the link where you can consult more about it.

.controller('MyCachedViewCtrl', function($scope){
var initView = function(){...};
//...some stuff...

$scope.$on('$ionicView.beforeEnter', function(){
    initView();
});

$scope.refresh = function(){
    $state.reload(true);
};});

Reload Page in Ionic

I hope it helps you.

    
answered by 03.08.2017 в 18:40
0

what you need is to reload the state again, a solution could be:

$window.location.reload(true);

Inside your controller, add $ window.

function tuControlador($window){
}

This what it does is to reload your state in which you find yourself. I hope to help you

    
answered by 27.02.2018 в 00:33