热门
最新
红包
立Flag
投票
同城
我的
发布
CSDN App 扫码分享
评论
点赞
打赏
- 复制链接
- 举报
下一条:
#第一行代码#<!DOCTYPE html><html><head><meta charset="utf-8"><script src="https://cdn.staticfile.org/angular.js/1.6.3/angular.min.js"></script></head><body><div ng-app="tuodan" ng-controller="zhaoduixiangCtrl"><ul> <li ng-repeat="x in jieri"> {{ x.mingzi + ', ' + x.content }} </li></ul></div><script>var app = angular.module('tuodan', []); app.controller('zhaoduixiangCtrl', function($scope, $http) { $http({ method: 'GET', url: 'https://zhaoduixiang.app/qixi/tuodan' }).then(function successCallback(response) { //......... }, function errorCallback(response) { console.log("请求失败执行代码"); var ns = []; var duixiang = new Object(); duixiang.mingzi="未知"; duixiang.content="脱单是不可能的"; ns.push(duixiang); $scope.jieri = ns; }); });</script></body></html>
