So, I'm in the process of transmitting information from one page to another. Essentially, I retrieve data from an API and use that data to organize the page categories along with their respective details.
Each detail acts as a link, and once clicked, it only sends that particular information to a template page, which then arranges the content accordingly.
var app = angular.module('example', [require 'angular-route']);
app.controller('example_ctrl', ['$scope', '$http', function($scope,
$http){
$http.get('example_data.json').success(function(data){
$scope.response = data;
});
}]);
The code above helps me fetch the data from the API endpoint. I have a good grasp on that part. However, I'm facing some confusion on how to pass that data through a repeating link in the HTML.
<ul>
<li ng-repeat='item in response'>
<a href='#' ng-click='goToTemplate(item)'>
<p>{{item.title}}</p>
</a>
</li>
</ul>