You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
735 B

  1. 'use strict';
  2. angular.module('app.users', ['ngRoute'])
  3. .config(['$routeProvider', function($routeProvider) {
  4. $routeProvider.when('/users', {
  5. templateUrl: 'views/users/users.html',
  6. controller: 'UsersCtrl'
  7. });
  8. }])
  9. .controller('UsersCtrl', function($scope, $http) {
  10. $scope.users = [];
  11. $scope.loadMorePagination = true;
  12. $scope.pageUsers = 0;
  13. $http.get(urlapi + 'users?page=' + $scope.pageUsers)
  14. .then(function(data) {
  15. console.log('data success');
  16. console.log(data);
  17. $scope.users = data.data;
  18. }, function(data) {
  19. console.log('data error');
  20. });
  21. });