博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
AngularJS(5)-Http
阅读量:5927 次
发布时间:2019-06-19

本文共 1488 字,大约阅读时间需要 4 分钟。

$http 是 AngularJS 中的一个核心服务,用于读取远程服务器的数据

加入下面有一个存储在web服务器上的数据,假设地址为http://TestWebData/myData.php

{"records":[{"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"}]}

  

AngularJS 实例
  • {
    { x.Name + ', ' + x.Country }}

  

 

转载于:https://www.cnblogs.com/yk123/p/5911809.html

你可能感兴趣的文章
JAVA设计模式之【策略模式】
查看>>
[ZigBee] 15、Zigbee协议栈应用(一)——Zigbee协议栈介绍及简单例子(长文,OSAL及Zigbee入门知识)...
查看>>
Webkit是如何加载网页的
查看>>
jQuery源码分析系列(39) : 动画队列
查看>>
【译】在ASP.NET中创建PDF-iTextSharp起步
查看>>
35.6. ssh 证书植入
查看>>
XAMPP下的composer的安装
查看>>
[LeetCode] Search in Rotated Sorted Array II 在旋转有序数组中搜索之二
查看>>
Oracle 11G DataGuard重启详细过程
查看>>
AE中图层刷新
查看>>
Fluentd安装——通过rpm方式
查看>>
[LeetCode] Implement Magic Dictionary 实现神奇字典
查看>>
python Image PNG getpixel R/G/B/A
查看>>
取消word中所有超链接
查看>>
属性驱动的架构设计方法图解
查看>>
31.12. [Warning] Changed limits: max_open_files: 5000 (requested 20480)
查看>>
[LeetCode] Merge Two Sorted Lists 混合插入有序链表
查看>>
AWWWB 网站克隆器 更新到1.01 修正错误
查看>>
5.8. grep, egrep, fgrep, rgrep - print lines matching a pattern
查看>>
25.3. UUID()
查看>>