arnaucube
arnaucube/decentralized-blogging-platformPublic Self-hosted repository
decentralized-blogging-platform/webapp/views/user/user.js
webapp/views/user/user.jsRaw
 1'use strict';
 2
 3angular.module('app.user', ['ngRoute'])
 4
 5    .config(['$routeProvider', function($routeProvider) {
 6        $routeProvider.when('/user', {
 7            templateUrl: 'views/user/user.html',
 8            controller: 'UserCtrl'
 9        });
10    }])
11
12    .controller('UserCtrl', function($scope, $rootScope, $http) {
13
14        /*$http.get(apiurl + 'user/' + )
15            .then(function(data) {
16                console.log('data success');
17                console.log(data);
18                $scope.user = data.data;
19            }, function(data) {
20                console.log('no user');
21            });*/
22            //fake data
23          $scope.user = user;
24          $scope.featured_posts= featured_posts;
25    });