Skip to content

Instantly share code, notes, and snippets.

@xcarpentier
Created December 11, 2014 17:13
Show Gist options
  • Save xcarpentier/aa32cea6e892f34ac2e7 to your computer and use it in GitHub Desktop.
Save xcarpentier/aa32cea6e892f34ac2e7 to your computer and use it in GitHub Desktop.
/* Recommandé */
function config ($routeProvider) {
$routeProvider
.when('/avengers', {
templateUrl: 'avengers.html',
controller: 'Avengers',
controllerAs: 'vm',
resolve: {
moviesPrepService: moviePrepService
}
});
}
moviePrepService.$inject = ['movieService'];
function moviePrepService(movieService) {
return movieService.getMovies();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment