Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. // public/core.js
  2. var scotchTodo = angular.module('scotchTodo', []);
  3.  
  4. function mainController($scope, $http) {
  5. $scope.formData = {};
  6.  
  7. // when landing on the page, get all todos and show them
  8. $http.get('/api/todos')
  9. .success(function(data) {
  10. $scope.todos = data;
  11. console.log(data);
  12. })
  13. .error(function(data) {
  14. console.log('Error: ' + data);
  15. });
  16. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement