title: I want to refresh or reload the $scope evey 60 secs
body: <pre><code>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:
  </code></pre>
  
  <h2>refresh.component.js</h2>
  
  <pre><code>    myApp.component('refreshComponent', {
          template:"&lt;button class='btn btn-lg btn-info text-uppercase' ng-click='vm.refresh()'Refresh &lt;/button&gt;",
          controllerAs: 'vm',
          controller: function RefreshController($scope, $element, $attrs) {
             vm = this;
  
            vm.refresh = function(){
              location.reload();
            }
          }
        });
  </code></pre>
  
  <p>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) </p>
  
  <ol>
  <li>The button should not longer exist, so it will be automatically
  refreshing avery 60 secs.</li>
  <li>The component should not longer exist.</li>
  <li>I have an utils.js, where I suppose I should place the next code:
  
  <pre><code>setTimeout($scope.apply(), 60000);
  setTimeout($scope.digest(), 60000);
  </code></pre></li>
  </ol>
  
  <p>I dont know, if I am using apply or diggest in the correct way</p>