The reportForm page allows users to input information and submit it to create a report.
reportData = {
headline: $scope.headline,
fromDate: $scope.fldFromDate,
toDate: $scope.fldToDate,
whatever: $scope.whatever
}
$http.post(reportUrl + $scope.reportName, reportData)
.then(function successCallback(data) {
console.log("Ok");
}, function errorCallback(err) {
console.log("Call Report ERROR: " + err);
});
}
I also have several generate report pages that utilize the user-submitted data to create printable reports (hence why I keep them separate).
QUESTION: How can the generate report page access the data submitted through the reportForm page?
I've looked into factories, services, and rootScope, but I'm unsure how they could facilitate this communication. Since I'm sending data to another page, how can I share this data between them using Angular functions? (I'm still new to Angular, so please go easy on me!)
In Node.js, I would typically use a router to handle read/write operations for data transfer.