diff options
| author | Evan Chiu | 2014-10-30 22:52:30 -0400 | 
|---|---|---|
| committer | Evan Chiu | 2014-10-30 22:52:30 -0400 | 
| commit | 496b780ee2f9af613e3f3b92f86c369d654a6b48 (patch) | |
| tree | 070be919697dc2848b62770c2e5797c56ca50523 /public/scripts/controllers.js | |
| parent | 60de545f54eda6c9ce20d78030940bfaa1a34c40 (diff) | |
| download | sipping-point-496b780ee2f9af613e3f3b92f86c369d654a6b48.tar.bz2 | |
Adding style, friends
Diffstat (limited to 'public/scripts/controllers.js')
| -rw-r--r-- | public/scripts/controllers.js | 39 | 
1 files changed, 39 insertions, 0 deletions
| diff --git a/public/scripts/controllers.js b/public/scripts/controllers.js new file mode 100644 index 0000000..048853e --- /dev/null +++ b/public/scripts/controllers.js @@ -0,0 +1,39 @@ +'use strict'; + +/* Controllers */ + +angular.module('app.controllers', []) +  .controller('loginController', +  ['$scope', '$routeParams', '$http', +  function($scope, $routeParams, $http) { +    $scope.title='Login' +  }]) +  .controller('homeController', +  ['$scope', '$routeParams', '$http', +  function($scope, $routeParams, $http) { +    $scope.title='Home' +  }]) +  .controller('newController', +  ['$scope', '$routeParams', '$http', +  function($scope, $routeParams, $http) { +    $scope.title='New Event' + +    window.setTimeout(function(){ +      console.log('calling'); +      $http.get('https://graph.facebook.com/v2.2/' +        + AUTH.userID + '/friends?access_token=' +        + AUTH.accessToken +        + '&format=json&method=get&pretty=0&suppress_http_code=1') +        .success( +        function(data) { +          console.log(data); +          $scope.friends = data.data; +        } +      ); +    }, 3000); +  }]) +  .controller('eventController', +  ['$scope', '$routeParams', '$http', +  function($scope, $routeParams, $http) { +    $scope.title='Event' +  }]) | 
