I'm currently exploring Angular and working on a project that involves retrieving data from an API and displaying it in an HTML table. Right now, I am experimenting with manipulating the table data to update the model (JSON). While I understand that making these changes would require API support, I want to test this functionality using mock data within the JavaScript file.
Could you please review the code in this Fiddle and provide guidance on how I can achieve this?
(function() {
var app = angular.module('myApp', []);
app.controller('PeopleController', function($scope, $http) {
$http({
url: "https://api.myjson.com/bins/584d5",
method: "GET"
}).success(function(data,status) {
$scope.people = data.people;
});
});
})();
Thank you!