我正在按照这里的简单教程进行操作
http://www.w3schools.com/angular/angular_http.asp
我的数据:
[{"idQuestion":1,"content":"What is the difference between HTML and XML?"}, {"idQuestion":2,"content":"What is the module code of Advanced Programming?"}, {"idQuestion":3,"content":"What is the author of this websites first name?"}, {"idQuestion":4,"content":"What is the correct syntax to retrieve data from a Mongo Database?"}, {"idQuestion":5,"content":"Which one of these statements is false?"}]
他们的数据:
[ { "Name" : "Alfreds Futterkiste", "City" : "Berlin", "Country" : "Germany" }, { "Name" : "Berglunds snabbköp", "City" : "Luleå", "Country" : "Sweden" }, { "Name" : "Centro comercial Moctezuma", "City" : "México D.F.", "Country" : "Mexico" }, { "Name" : "Ernst Handel", "City" : "Graz", "Country" : "Austria" }, { "Name" : "FISSA Fabrica Inter. Salchichas S.A.", "City" : "Madrid", "Country" : "Spain" }, { "Name" : "Galería del gastrónomo", "City" : "Barcelona", "Country" : "Spain" }, { "Name" : "Island Trading", "City" : "Cowes", "Country" : "UK" }, { "Name" : "Königlich Essen", "City" : "Brandenburg", "Country" : "Germany" }, { "Name" : "Laughing Bacchus Wine Cellars", "City" : "Vancouver", "Country" : "Canada" }, { "Name" : "Magazzini Alimentari Riuniti", "City" : "Bergamo", "Country" : "Italy" }, { "Name" : "North/South", "City" : "London", "Country" : "UK" }, { "Name" : "Paris spécialités", "City" : "Paris", "Country" : "France" }, { "Name" : "Rattlesnake Canyon Grocery", "City" : "Albuquerque", "Country" : "USA" }, { "Name" : "Simons bistro", "City" : "København", "Country" : "Denmark" }, { "Name" : "The Big Cheese", "City" : "Portland", "Country" : "USA" }, { "Name" : "Vaffeljernet", "City" : "Århus", "Country" : "Denmark" }, { "Name" : "Wolski Zajazd", "City" : "Warszawa", "Country" : "Poland" } ]
我已经在Tomcat项目中使用过这些数据,所以我确定它的格式正确,但它并没有像网络获取请求一样被读取,因为它没有下载任何内容。
我不知道为什么,这是格式化吗?
谢谢, 亚当