Within my angularjs application, I am faced with a challenge involving two pages. The first page retrieves data from a database and displays it in a table. Upon double-clicking on a row, the user is directed to another page where more detailed information is shown. The issue lies in how to pass the necessary data from the first page to the second one for display. All the required data is located within the "branchs" variable, some of which is displayed on the initial page. Here's a snippet of my code:
var app= angular.module('MyApp' , []);
app.controller('Ctrl', function($scope, $http){
$http.get('http://localhost:8080/Test_WS/test/branchs/brnch')
.then(function(response) {
$scope.branchs = response.data;
})
.then(function(response) {
$scope.details = function (b) {
window.location = 'http://localhost:8080/TestProject/CreateBranch.html';
};
});
});