index.js 553 B

1234567891011121314151617181920212223
  1. angular
  2. .module('app')
  3. .controller('IndexController', function ($scope, $http) {
  4. var fetchBlogConfig = function () {
  5. $http.get('https://gogh.apekd.com/api/v1/config/base').then(function (data) {
  6. console.log(data);
  7. });
  8. };
  9. fetchBlogConfig();
  10. $scope.user = {
  11. id: '01',
  12. name: 'job',
  13. age: 13
  14. };
  15. $scope.test = function () {
  16. var id = $scope.user.id;
  17. $scope.test2(id);
  18. };
  19. $scope.test2 = function (id) {
  20. console.log(id);
  21. $('.ui.modal').modal('show');
  22. };
  23. });