I have a service returning static JSON data saving to a $scope variable like this:
$scope.workout = Workouts.get(id);
I´m manipulation this $scope.workout with shift() and slice(). When I try to set $scope.workout to the initial data from the Service, this does not work.
$scope.workout = Workouts.get(id);
The $scope.workout has been changed. I thought that another call of the service would refresh the data? Am I wrong? How to get the initial data saved in the service?
Workouts.get()? Is that using any non-angular asynchronous code?