php + angularjs $http get 请求 显示数据
2016-05-26 17:33
459 查看
html代码: 利用ng-repeat 循环显示数据
<html ng-app="myApp" ng-controller="customersCtrl"> <head><script src="http://code.angularjs.org/angular-1.0.1.min.js"></script></head> <body> <div > <ul ng-repeat="x in list"> {{x.name}} </ul> </div>
angularjs 代码
利用http.get 获取 数据赋值给list
var app = angular.module('myApp', []); var a; app.controller('customersCtrl', function ($scope, $http) { $http({ method: 'get', url: 'aaa.php' }).success(function (data1) { $scope.list=data1;});
相关文章推荐
- 以太坊(Ethereum)开发框架 Truffle 入门(五):部署到网络
- web工程下的有些路径的jsp可以直接在http url中输入进行显示,有些却不能显示??The requested resource is not available.
- 网络编程中常见的5种I/O模型
- java HTTP基本框架
- 计算机网络面试题总结
- HttpClient方式模拟http请求
- 对NSURLSession进行网络请求方法封装
- TCP/IP传输层,你懂多少?
- 2016-JAVA网络编程-网络协议篇
- 计算机网络笔记
- Java网络编程精解之ServerSocket用法详解一
- js最强的匹配网址-url的正则表达式:匹配www,http开头的一切网址
- 将token添加到请求头中进行网络请求
- VNC不显示桌面
- HttpClient方式模拟http请求设置头
- [判断手机网络状态]
- 计算机网络知识库
- python(十四)网络编程
- 软考网络工程师易混淆的知识点汇总
- 在发起网络请求时可能会需要对URLString进行编码