Created
December 19, 2016 02:46
-
-
Save ViewFromTheBox/fd11d02b914d9e9255eca975b6ffdd2c 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
| .controller('SinglePost', ['$scope', '$http', '$stateParams', 'Comments', 'SortComments', function ($scope, $http, $stateParams, Comments, SortComments) { | |
| $http.get(myLocalized.api_url + 'posts?slug=' + $stateParams.slug + '&_embed').success(function(res){ | |
| $scope.post.comments = SortComments.arrangeComments( $scope.post.comments ); | |
| $scope.numComments = $scope.post.comments.length; | |
| }); | |
| }]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment