mirror of
https://github.com/arnaucube/MEANseed.git
synced 2026-02-07 19:46:44 +01:00
server and webapp working
This commit is contained in:
47
webapp/views/user/user.html
Executable file
47
webapp/views/user/user.html
Executable file
@@ -0,0 +1,47 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="panel">
|
||||
<div class="panel-heading c_blue300">
|
||||
<h3 class="panel-title">User profile</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="list-group">
|
||||
<a class="list-group-item">
|
||||
<div class="row-picture">
|
||||
<img class="circle" ng-src="{{user.avatar}}" alt="icon">
|
||||
</div>
|
||||
<div class="row-content">
|
||||
<h4 class="list-group-item-heading">
|
||||
{{user.username}}
|
||||
<span ng-show="user.validated" class="badge badge-secondary c_blue300">Validated</span>
|
||||
</h4>
|
||||
|
||||
<p class="list-group-item-text">{{user.description}}</p>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<p>
|
||||
{{user.email}}
|
||||
</p>
|
||||
<p>
|
||||
{{user.telegram}}
|
||||
</p>
|
||||
<p>
|
||||
{{user.phone}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="panel">
|
||||
<div class="panel-heading c_blue300">
|
||||
<h3 class="panel-title">User posts</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
23
webapp/views/user/user.js
Executable file
23
webapp/views/user/user.js
Executable file
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
angular.module('app.user', ['ngRoute'])
|
||||
|
||||
.config(['$routeProvider', function($routeProvider) {
|
||||
$routeProvider.when('/user/:userid', {
|
||||
templateUrl: 'views/user/user.html',
|
||||
controller: 'UserCtrl'
|
||||
});
|
||||
}])
|
||||
|
||||
.controller('UserCtrl', function($scope, $http, $routeParams) {
|
||||
$scope.user = {};
|
||||
$http.get(urlapi + 'users/id/' + $routeParams.userid)
|
||||
.then(function(data, status, headers, config) {
|
||||
console.log('data success');
|
||||
console.log(data);
|
||||
|
||||
$scope.user = data.data;
|
||||
}, function(data, status, headers, config) {
|
||||
console.log('data error');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user