ionic学习笔记3
来源:互联网 发布:三维平面设计软件 编辑:程序博客网 时间:2024/05/29 08:34
ion-content
ionic 下拉刷新
在加载新数据的时候,我们需要实现下拉刷新效果
<html><head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <title>ion-content</title> <link href="http://www.runoob.com/static/ionic/css/ionic.min.css" rel="stylesheet"> <script src="http://www.runoob.com/static/ionic/js/ionic.bundle.min.js"></script> <script type="text/javascript"> angular.module('starter', ['ionic']) .run(function($ionicPlatform) { $ionicPlatform.ready(function() { // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard // for form inputs) if(window.cordova && window.cordova.plugins.Keyboard) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); } if(window.StatusBar) { StatusBar.styleDefault(); } }); }) .controller( 'actionsheetCtl',['$scope','$timeout' ,'$http',function($scope,$timeout,$http){ $scope.items=[ { "name":"HTML5" }, { "name":"JavaScript" }, { "name":"Css3" } ]; $scope.doRefresh = function() { $http.get('item.json') //注意改为自己本站的地址,不然会有跨域问题 .success(function(newItems) { $scope.items = newItems; }) .finally(function() { $scope.$broadcast('scroll.refreshComplete'); }); }; }]) </script></head><body ng-app="starter" ng-controller="actionsheetCtl" ><ion-pane> <ion-content > <ion-refresher pulling-text="下拉刷新" on-refresh="doRefresh()"></ion-refresher> <ion-list> <ion-item ng-repeat="item in items" ng-bind="item.name"></ion-item> </ion-list> </ion-content></ion-pane></body></html>
0 0
- ionic学习笔记3
- Hello Ionic - Ionic学习笔记
- <学习笔记> 安装Ionic
- Ionic,AngularJS学习笔记
- ionic学习笔记1
- ionic学习笔记2
- ionic学习笔记4
- ionic学习笔记5
- Ionic学习笔记
- ionic js学习笔记
- ionic学习笔记
- Ionic学习笔记
- ionic 学习笔记
- <学习笔记> 学习 Ionic 随笔
- Ionic学习笔记三 Gulp在ionic中的使用
- ionic和angularjs开发app学习笔记
- Ionic学习笔记二 Scss配置
- Ionic框架学习笔记(1)
- PCI/PCIe 的那些事(1)- 总线基本知识
- 多用字面量语法,少用与之等价的方法
- Maximum Value
- 读取手机联系人
- 判断某一年是闰年还是平年
- ionic学习笔记3
- 手把手带你自制Linux系统之五 一些小细节的完善
- 机器学习算法与Python实践之(四)支持向量机(SVM)实现
- 打印图案
- 假设检验中的p值
- HDU-3466-Proud Merchants(01背包问题)
- Android中往手机自带的存储空间写入文件
- iOS开发学习之OC篇1、类的创建
- Androidstudio加速编译