create factory for posts
inject post service into MainCtrl