signup and login working

This commit is contained in:
arnaucode
2018-02-01 13:14:51 +01:00
parent ad76d73e12
commit bad807b79d
33 changed files with 1040 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<div class="container">
<div class="row">
<div class="col-sm-4">
<div ng-include="'views/user_template.html'"></div>
</div>
<div class="col-sm-8">
<div class="card">
<table class="table table-striped table-hover ">
<thead>
<tr>
<th>#</th>
<th>Title</th>
<th>Description</th>
<th>Accuracy</th>
<th>Rating</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="model in user.models">
<td>1</td>
<td>{{model.title}}</td>
<td>{{model.description}}</td>
<td>{{model.accuracy}}</td>
<td>{{model.rating}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,24 @@
'use strict';
angular.module('app.profile', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/profile', {
templateUrl: 'views/profile/profile.html',
controller: 'ProfileCtrl'
});
}])
.controller('ProfileCtrl', function($scope, $rootScope, $http) {
$http.get(clienturl + 'user')
.then(function(data) {
console.log('data success');
console.log(data);
$scope.user = data.data;
localStorage.setItem("ai_user", JSON.stringify($scope.user));
}, function(data) {
console.log('no user');
});
});