I am new to angularJS and am wondering about caching etc.
I have a wizard with two steps, I want to be able to click back and then fill out the forms that their users had.
In my 1Partial page, I have this:
<li ng-repeat="pick in picks | orderBy:orderProperty"> <b><span ng-bind="pick.name"/></b> <input type="checkbox" ng-model="pick.checked" ng-click="updateBasket(pick)"> </li>
When I move to the next page, click the "Back" button, and the checkboxes will be cleared, because my RESTIVE call for the java service is called again. How can I cache this answer?
From my controller, it gets to my REST web service every time.
$scope.picks = Pick.query();
My service
angular.module('picksService', ['ngResource']). factory('Pick', function ($resource) { return $resource('rest/picks/:id', {}, { 'save': {method: 'PUT'} }); });
source share