martinsonesson.se JsDOC

BlogController

new BlogController($scope, $log, $location, wordpressService)

Controller for logic in the blog section
Parameters:
Name Type Description
$scope $scope See https://code.angularjs.org/1.2.26/docs/api/ng/type/$rootScope.Scope
$log $log See https://code.angularjs.org/1.2.26/docs/api/ng/service/$log
$location $location See https://code.angularjs.org/1.2.26/docs/api/ng/service/$location
wordpressService services.WordpressService Service for handling calls to Wordpress for fetching blog data
Source:

Methods

formatPosts()

Function for formating blog posts by modifying data in the model
Source:

goToPost(id)

Function for opening a blogpost by a given ID
Parameters:
Name Type Description
id Obj The id for which blog post to redirect to
Source: