Last active
September 24, 2015 13:18
-
-
Save vaneves/ec03f5ffbab1ced9166c to your computer and use it in GitHub Desktop.
Curso Ninja - Controllers Blog
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
controllers.controller('BlogListCtrl', function ($scope, PostService) { | |
$scope.posts = PostService.query(); | |
}); | |
controllers.controller('BlogDetailCtrl', function ($scope, $routeParams, PostService) { | |
$scope.post = PostService.get({id: $routeParams.id}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment