YouAndWeb_TwoToc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
'use strict';
angular.module('dashboardApp')
.controller('AdminCtrl', function($scope, $http, Auth, User) {
// Use the User $resource to fetch all users
$scope.users = User.query();
$scope.delete = function(user) {
User.remove({ id: user._id });
$scope.users.splice(this.$index, 1);
};
$scope.user = {};
$scope.create = function(user) {
User.save(user);
$scope.users.push(user);
};
});
|
Revision |
Author |
Commited |
Message |
a2ecfb ...
|
PTKDev |
Fri 20 Nov, 2015 11:22:35 +0000 |
|