第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

請問使用angular中的$http報錯是為什么

請問使用angular中的$http報錯是為什么

呆呆呆 2017-07-04 10:15:35
<!DOCTYPE?html> <html?ng-app="demo2"> <head> ????<meta?charset="UTF-8"> ????<title>表格</title> ????<script?src="js/angular.js"></script> ????<script?src="js/biaogeTest.js"></script> </head> <body> ????<div?ng-controller="customersCtrl"> ????????<table> ????????????<tr?ng-repeat="x?in?names"> ????????????????<td>{{?x.Name?}}</td> ????????????????<td>{{?x.Country?}}</td> ????????????</tr> ????????</table> ????</div> </body> </html>/** ?*?Created?by?tongwii?on?2017/7/4. ?*/ var?app?=?angular.module('demo2',[]); app.controller('customersCtrl',function?($scope,$http)?{ ????$http.get("http://www.runoob.com/try/angularjs/data/Customers_JSON.php") ????????.then(function?(result)?{ ????????????$scope.names?=?result.data.records; ????????}); });錯誤信息biaogeTest.html:1?XMLHttpRequest?cannot?load?http://www.runoob.com/try/angularjs/data/Customers_JSON.php.? No?'Access-Control-Allow-Origin' ?header?is?present?on?the?requested?resource.?Origin?'http://localhost:63342'? is?therefore?not?allowed?access. angular.js:14525?Possibly?unhandled?rejection:?{"data":null,"status":-1,"config":{"method":"GET", "transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback", "url":"? "headers":{"Accept":"application/json,?text/plain,?*/*"}},"statusText":""} (anonymous)?@?angular.js:14525在網(wǎng)上查是說ajax跨域,請問這個如何解決?
查看完整描述

目前暫無任何回答

  • 0 回答
  • 1 關(guān)注
  • 4363 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號