Created
December 11, 2014 17:13
-
-
Save xcarpentier/aa32cea6e892f34ac2e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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