When an item in the list is clicked, an ng-click fires with the id of the item sent, the idea was to get the description of the item to match the id but it seems to only be picking up the index of the item instead.
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope, $http) {
$scope.name = 'World';
$http.get('tasks.json').success(function(data) {
$scope.tasks = data.item;
console.log($scope.tasks);
});
$scope.viewTask = function(id) {
console.log(id);
console.log($scope.tasks[id].description); //The Description to go with the ID.
};
});