Skip to content

Instantly share code, notes, and snippets.

@dmarr
Created April 20, 2013 19:29
Show Gist options
  • Save dmarr/5427090 to your computer and use it in GitHub Desktop.
Save dmarr/5427090 to your computer and use it in GitHub Desktop.
'use strict';
/*
* This method seems to break the app, use the bare function below instead
*/
//angular.module('phoenixApp', ['articleServices'])
// .controller('StoryCtrl', function($scope, $routeParams, Article) {
// Article.get($routeParams.storyId).then(function (data) {
// $scope.article = data.data;
// });
// });
function StoryCtrl($scope, $routeParams, Article) {
Article.get($routeParams.storyId).then(function (data) {
$scope.article = data.data;
});
}
@dmarr
Copy link
Author

dmarr commented Apr 20, 2013

{{ article.headline }}

{{ article.publishedAt | date }} in {{ article.section }} by {{ article.author.displayName }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment