Working with HTML5 there is the implemented feature window.sessionStorage which is intended to store information as long as the browser session exists, that is, until you close the browser. In this example you have Jquery and Angular to be referenced on pages.
Code Example
home html.
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/angular.min.js"></script>
<script>
var App = angular.module('App', []);
App.controller('Controller', function($scope, $http){
$scope.peoples = [
{id: 1, name: 'People 1'},
{id: 2, name: 'People 2'},
{id: 3, name: 'People 3'}
];
$scope.edit = function(id){
var i = 0;
var a = false;
while (i < $scope.peoples.length && a === false){
if ($scope.peoples[i].id === id){
a = true;
} else {
i++;
}
}
if (i < $scope.peoples.length){
window.sessionStorage.setItem('people', JSON.stringify($scope.peoples[i]));
window.location.href='edit.html'
} else {
alert('Item não encontrado');
}
}
});
</script>
</head>
<body>
<div ng-app="App">
<ul ng-controller="Controller">
<li ng-repeat="people in peoples">
<a href ng-click="edit(people.id)">{{people.name}}</a>
</li>
</ul>
</div>
</body>
</html>
Edit.html
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="js/jquery-1.11.0.min.js"></script>
<script src="js/angular.min.js"></script>
<script>
var App = angular.module('App', []);
App.controller('Controller', function($scope, $http){
$scope.people = {};
$scope.init = function(){
$scope.people = JSON.parse(window.sessionStorage.getItem('people'));
window.sessionStorage.removeItem('people');
}
$scope.init();
});
</script>
</head>
<body>
<div ng-app="App" ng-controller="Controller">
<label for="id">Id:</label>
<input type="text" ng-model="people.id" id="id">
<br>
<label for="id">Nome:</label>
<input type="text" ng-model="people.name"id="name">
</div>
</body>
</html>
This way, the information contained in home.html is passed to Edit.html.
Obs: this code can be improved through your web application, that is, open home.html and click on some item being redirected to Edit.html and the clicked item will appear on that other page. I did not make a point of putting a code criticized but, yes functional and with this should be adapted as already said its application.
If you have solved the problem mark as answer :)
– leopiazzoli