Skip to content

Instantly share code, notes, and snippets.

@vaneves
Last active September 24, 2015 13:18
Show Gist options
  • Save vaneves/ec03f5ffbab1ced9166c to your computer and use it in GitHub Desktop.
Save vaneves/ec03f5ffbab1ced9166c to your computer and use it in GitHub Desktop.
Curso Ninja - Controllers Blog
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