In my application, I have a "search" button that retrieves an array of objects from a REST service. These values are then populated into a table using the ng-repeat directive. When a column is clicked, the page navigates to the next page with more details using the $routeProvider.
My query is: How can I retain the values in the table when the browser back button is clicked?
Below is my app.js code snippet:
myApp.config(['$routeProvider', function($routeProvider) {
$routeProvider
.when('/displayValues', {
templateUrl: 'DisplayValues.html',
controller: 'DisplayValuesController'
})
.when('/showDetails/:inputNumber', {
templateUrl: 'ShowDetails.html',
controller: 'DetailsController'
})
.otherwise({
redirectTo: '/displayValues'
});
}]);