title: Run part of controller code every time a page is navigated to in Ionic?
body: <p>In my controller below, the datapoint seems to only load data from the service the first time this page is opened. The next time it doesn't. At least that's how I have concluded it works.</p>
  
  <p>What is a good way to make it get data from the service every time the page is loaded?</p>
  
  <pre><code>(function(){
    angular.module('appname')
      .controller('EnterValueCtrl', ['$scope', '$state', '$filter', '$translate', 'SharedPropertiesSrvc',
        function($scope, $state, $filter, $translate, SharedPropertiesSrvc) {
  
          $scope.datapoint = {
            value: SharedPropertiesSrvc.datapoint.value,
            inputType: SharedPropertiesSrvc.datapoint.inputType
          };
  
        }]);
  })();
  </code></pre>
  
  <p>Here is my service code:</p>
  
  <pre><code>(function(){
    angular.module('appname')
      .factory('SharedPropertiesSrvc', [
        function(){
          return {
            datapoint: {
              inputType: '',
              value: ''
            }
        };
        }])
  })();
  </code></pre>