'use strict';

(function (angular) {

  function localStorageServiceFactory($window){
    if($window.localStorage){
      return $window.localStorage;
    }
    throw new Error('Local storage support is needed');
  }

  // Inject dependencies
  localStorageServiceFactory.$inject = ['$window'];

  // Export
  angular
    .module('myWorkout')
    .factory('localStorage', localStorageServiceFactory);

})(angular);
'use strict';

app.factory('localStorage', ['$window', function localStorageServiceFactory($window){
  if($window.localStorage){
    return $window.localStorage;
  }
  throw new Error('Local storage support is needed');
}]);

Adjust local storage factory to match Array notation
Adjust local storage factory to match Array notation
