mirror of
https://github.com/arnaucube/decentralized-blogging-platform.git
synced 2026-02-08 11:56:43 +01:00
added post page, and added write page, with text editor
This commit is contained in:
25
webapp/views/post/post.js
Normal file
25
webapp/views/post/post.js
Normal 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];
|
||||
});
|
||||
Reference in New Issue
Block a user