Skip to content

Instantly share code, notes, and snippets.

@mekhami
Created December 5, 2015 03:31
Show Gist options
  • Select an option

  • Save mekhami/8184dd42ebb353cdeac0 to your computer and use it in GitHub Desktop.

Select an option

Save mekhami/8184dd42ebb353cdeac0 to your computer and use it in GitHub Desktop.
.controller('AdminController', ['$scope', '$location', 'rsvpDataService', function($scope, $location, rsvpDS) {
$scope.rsvplist = [];
$scope.status;
getRsvpList();
function getRsvpList() {
rsvpDS.getAllRsvp()
.success(function(rsvps) {
angular.extend($scope.rsvplist, rsvps);
})
.error(function(data) {
$scope.status = data;
});
};
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment