Add web
This commit is contained in:
23
web/controllers/test_hello.js
Normal file
23
web/controllers/test_hello.js
Normal file
@@ -0,0 +1,23 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
angular
|
||||
.module('app')
|
||||
.controller('TestHelloCtrl', TestHelloCtrl);
|
||||
|
||||
TestHelloCtrl.$inject = ['$scope', 'smartRequest', '$location', 'Notification'];
|
||||
function TestHelloCtrl($scope, smartRequest, $location, Notification) {
|
||||
$scope.users = [];
|
||||
|
||||
$scope.getUsers = function () {
|
||||
smartRequest.get('php/hello', function (data) {
|
||||
$scope.users = data.users;
|
||||
});
|
||||
};
|
||||
|
||||
$scope.update = function () {
|
||||
$scope.getUsers();
|
||||
};
|
||||
|
||||
$scope.update();
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user