Answer the question
In order to leave comments, you need to log in
How to handle GET request parameters from AngularJS in Laravel?
At this time, I am writing a program that searches for all tasks for a specific goal (in general, there is a goal with a certain Id, and in order to complete it, all its tasks must be completed).
Upon completion of the download, the goal page sends a GET request to the server to pull out all the tasks, but I can’t figure out where to write down the Id of the goal to send
var goal_id = $scope.goal_id;
console.log($scope.goal_id);
/**
* Gets all tasks from the server
*
* @returns {object}
*/
function getall() {
$http.get('http://finalblog.local/task/index/' + $scope.goal_id).success(function(data) {
console.log($scope.goal_id);
console.log(data);
$scope.tasks = data;
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question