added post page, and added write page, with text editor

This commit is contained in:
arnaucode
2018-02-03 03:50:14 +01:00
parent b26533efa3
commit 2835d72779
16 changed files with 353 additions and 79 deletions

25
webapp/views/post/post.js Normal file
View File

@@ -0,0 +1,25 @@
'use strict';
angular.module('app.post', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/post', {
templateUrl: 'views/post/post.html',
controller: 'PostCtrl'
});
}])
.controller('PostCtrl', function($scope, $rootScope, $http) {
/*$http.get(apiurl + 'user/' + )
.then(function(data) {
console.log('data success');
console.log(data);
$scope.user = data.data;
}, function(data) {
console.log('no user');
});*/
//fake data
$scope.user = user;
$scope.post = user.posts[0];
});