title: Angular page doesn't refresh after data is added or removed
body: <p>I'm having a recurrent problem with my angular app whereby it doesn't refresh the page after data has been added, edited or removed. So if I add a new item to a list of subjects, the new item doesn't appear on the list unless I navigate away from the page and then come back to it. I've tried using route.reload and then resetting the scope of the subjects list below. I put in an alert to see if it get fired- but the alert appears before the page redirects back to the list of subjects, which is strange as $location.path('/subjects') is two lines before it. Here's my controller:</p>
  
  <pre><code>angular.module('myApp.controllers')
      .controller('SubjectEditCtrl', ['$scope', '$routeParams', 'SubjectFactory', 'SubjectsFactory', '$location', '$route',
      function ($scope, $routeParams, SubjectFactory, SubjectsFactory, $location, $route) {
  
      // callback for ng-click 'updateSubject':
  
      $scope.updateSubject = function () {
  
  //Performs an update to the server
          SubjectFactory.update($scope.subject);
  //Redirects to list of all subjects
          $location.path('/subjects/');
  //Should reset the scope of the subject list
          $scope.subjects = SubjectsFactory.query();
  //Should reload the page
          $route.reload();
  //For debugging- the alert appears BEFORE the redirect to list of all subjects happens
          alert('route reload happening');
      };
  
  
      SubjectFactory.show({id: $routeParams.subjectId}).$promise.then(function(subject) {
          $scope.subject = subject;
      }, function(err) {
          console.error(err);
      });
  
  
  }]);
  </code></pre>
  
  <p>Can anyone suggest a solution?</p>
  
  <p>EDIT: Subjects Service</p>
  
  <pre><code>var app = angular.module('myApp.services');
  
  app.factory('SubjectsFactory', function ($resource) {
      return $resource('https://myapiurl.com/subjects', {}, {
          query: { method: 'GET', isArray: true },
          create: { method: 'POST' }
      })
  });
  
  app.factory('SubjectFactory', function ($resource) {
      return $resource('https://myapiurl.com/subjects/:id', {}, {
          show: { method: 'GET', isArray: false },
          update: { method: 'PATCH', params: {id: '@id'} },
          delete: { method: 'DELETE', params: {id: '@id'} }
      })
  });
  </code></pre>