angular.module('plunker', [])

  .factory('Todos', function($http) {
    return {
      all: function() {
        return $http.get('/api/todos');
      }
    };
  })

  .controller('MainCtrl', function($scope, Todos) {
    Todos.all().then(function(result) {
      $scope.todos = result.data;
    });
  });
<!DOCTYPE html>
<html ng-app="plunker">

  <head>
    <meta charset="utf-8" />
    <title>AngularJS Plunker</title>
    <script>document.write('<base href="' + document.location + '" />');</script>
    <link rel="stylesheet" href="style.css" />
    <script data-require="angular.js@1.3.x" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.7/angular.js" data-semver="1.3.7"></script>
    <script data-require="angular.js@1.3.x" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.7/angular-mocks.js" data-semver="1.3.7"></script>
    <script src="app.js"></script>
    <script src="backend.js"></script>
  </head>

  <body ng-controller="MainCtrl">
    <h2>Our list of Todos</h2>
    <ul>
      <li ng-repeat="todo in todos">
        <input type="checkbox" ng-model="todo.completed" />{{ todo.title }}
      </li>
    </ul>
  </body>

</html>
/* Put your css in here */

angular.module('plunker')
  .config(function($provide) {
    $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
  })
  .run(function($httpBackend) {
    var things = [
      {
        id: 0,
        title: 'Finish fake backend',
        completed: true
      },
      {
        id: 1,
        title: 'Make some cool stuff',
        completed: false
      },
      {
        id: 2,
        title: 'Brainstorm new projects',
        completed: false
      }
    ];
    
    $httpBackend.whenGET('/api/todos').respond(200, things);
  });