I want to refresh or reload the $scope evey 60 secs Hi I am learning angularjs. The main idea is to "refesh" or "reload" the$scope.
I was able to refresh the page with this location.reload();.
But i was recomended to refresh the $scope, not the hole page. I reserached about this, I reckon I should use apply or digest. As so far the code is like this:  refresh.component.js  myApp.component('refreshComponent', { template:"<button class='btn btn-lg btn-info text-uppercase' ng-click='vm.refresh()'Refresh </button>", controllerAs: 'vm', controller: function RefreshController($scope, $element,$attrs) {
vm = this;

vm.refresh = function(){
}
}
});


As I understand this should change:(this are assumptions, I dont know, if I sould keep the component or refactor into a controller or somthing else, it is not clear to me)

1. The button should not longer exist, so it will be automatically
refreshing avery 60 secs.
2. The component should not longer exist.
3. I have an utils.js, where I suppose I should place the next code:
setTimeout($scope.apply(), 60000); setTimeout($scope.digest(), 60000);
`

I dont know, if I am using apply or diggest in the correct way

Source: New feed
Source Url I want to refresh or reload the \$scope evey 60 secs