GetUsers, GetUser, NewPost, GetPosts, GetPost

This commit is contained in:
arnaucode
2018-02-03 12:52:40 +01:00
parent 2835d72779
commit 592bf9e8e8
22 changed files with 385 additions and 117 deletions

View File

@@ -12,8 +12,14 @@ angular.module('app.main', ['ngRoute'])
.controller('MainCtrl', function($scope, $rootScope, $http) {
$scope.user = user;
$scope.featured_posts= featured_posts;
$scope.posts = posts;
$scope.posts = {};
$http.get(apiurl + 'posts')
.then(function(data) {
console.log('data success');
console.log(data);
$scope.posts = data.data;
}, function(data) {
console.log('no user');
});
});