伙计们,我是使用angularJS时的新手,我想问一下在angularJS中实现HTTP.get的问题,我已经尝试了很多我知道的东西,并且在搜索引擎中找到了。有人可以告诉我使用API实现GET方法的方式有什么问题。
HTML代码:
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
float n = 0;
const char a = 'a';
const char b = 'b';
char foo[10];
cout << "What is the capital of Missouri?\n\na. Jefferson City \nb. Langsing \nc. Concord \nd. Boston \n" << endl;
cout << "Type a, b, c, or d: ";
cin >> foo[0];
system("CLS");
cout << "What is the population of Texas?\n\na. 39,536,653 \nb. 28,304,596 \nc. 10,429,379 \nd. 3,930,864\n" << endl;
cout << "Type a, b, c, or d: ";
cin >> foo[1];
system("CLS");
if (foo[0] == a)
n = n + 1;
if (foo[1] == b)
n = n + 1;
n = n/2 *100;
cout << "You made a " << n << " on your test!" << endl;
return 0;
}
GET API脚本:
<!-- Data User -->
<tr ng-repeat="data in stockdata">
<td>{{data.product.code}}</td>
<td>{{data.product.name}}</td>
<td>{{data.warehouse.name}}</td>
<td>{{data.quantity}}</td>
<td></td>
</tr>
<!-- Data User -->
有人可以帮助您走上正轨吗?
发生的一些问题是:
数据响应失败:{数据:空,状态:-1,标头:ƒ,配置: {…},statusText:“”,...}