angular从网络获取数据赋值
来源:互联网 发布:淘宝评价不能发图片 编辑:程序博客网 时间:2024/06/06 04:19
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <script type="text/javascript" src="angular-1.3.0.js"></script> <script type="text/javascript"> var app=angular.module("myApp",[]); app.value("url","https://free-api.heweather.com/v5/weather?city=beijing&key=545d63e185fc48169a43cbabba6e74d2"); app.controller("myCtrl",function ($scope,$http,url) { $http.get(url).then(function (response) { $scope.city = response.data.HeWeather5[0].basic.city; $scope.now = response.data.HeWeather5[0].now.cond.txt; },function (response) { console.log(response.status); }); }) </script></head><body ng-app="myApp"><div ng-controller="myCtrl"> <div>城市:{{city}}</div> <div>天气:{{now}}</div></div></body></html>
阅读全文
0 0
- angular从网络获取数据赋值
- angular从json串里获取数据赋值ul和table
- 从网络获取数据
- 从网络上获取数据
- iOS 从网络获取数据
- 从网络获取gson数据
- 从网络获取JSON格式数据
- 十六、从网络中获取网页数据
- iOS总结(从网络上获取数据)
- 十六、从网络中获取网页数据
- FileInputStream不支持从网络路径获取数据
- 从网络接口获取json数据不完全
- ReactNative从网络获取数据并显示
- Angular获取数据各种方法
- angular 模拟服务器获取数据
- 29.angular的从后台获取数据的方法http模块
- H5的video的src从angular的controller赋值
- 从网络里面获取数据写入到文件
- springmvc接收List和数组
- linux下qt+opencv、arm端移植opencv
- Codeforces Gym 100548F Color (组合数+容斥)
- LwIP之debug.h文件解析
- 词汇总结·《雅思词汇看这本书就够了》
- angular从网络获取数据赋值
- 关于打印99乘法表的python代码
- Oracle中scott账户的解锁
- 浅谈nginx内存池(一)
- Redis笔记(2)-配置
- SPFA———【模板】单源最短路径、租用游艇
- 选择(select)和冒泡(bubble)排序
- ccf刷题记03
- recyclerview的博客网址需要的权限