Skip to content

Instantly share code, notes, and snippets.

@satsalou
Last active March 31, 2016 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satsalou/dd3ea5d0b30b15767e8a to your computer and use it in GitHub Desktop.
Save satsalou/dd3ea5d0b30b15767e8a to your computer and use it in GitHub Desktop.
(function() {
'use strict';
angular
.module('supermodular.movies')
.controller('MoviesController', MoviesController);
MoviesController.$inject = ['moviesService', '$http', '$scope'];
/* @ngInject */
function MoviesController(moviesService, $http, $scope) {
(function activate() {
getMovies();
})();
function getMovies() {
$http.get(moviesService.url).success(function(data) {
$scope.movies = data.movies;
});
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment