Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var myApp = angular.module('myApp');
myApp.factory('TodoService', function($http){
return {
loadTodos : function(){
return $http.get('todos');
createTodo: function(todo){
return $'todos',todo);
deleteTodo: function(id){
return $http.delete('todos/'+id);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.