<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<link rel="stylesheet" href="css/ionic.css" />
<script type="text/javascript" src="js/ionic.bundle.min.js" ></script>
<script>
var app = angular.module("myApp",['ionic']);
app.controller("myCtrl",function($scope,$http){
$scope.itmes = ["C语言","B语言","D语言"];
$scope.loadm = false;
$scope.refreshBooks = function(){
$http({
method:"get",
url:"books.json"
}).then(function success(response){
$scope.itmes = response.data;
},function error(response){
}).finally(function(){
$scope.$broadcast("scroll.refreshComplete");
});
}
$scope.loadMore = function(){
}
});
</script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
<ion-header-bar align-title="center" class="bar-positive">
<div class="buttons">
<button class="button" ng-click="aclick();">A按钮</button>
</div>
<h1 class="title">1511k--书店</h1>
<div class="buttons">
<button class="button" >B按钮</button>
</div>
</ion-header-bar>
<ion-content>
<ion-refresher pulling-text="下拉刷新....." on-refresh="refreshBooks();"></ion-refresher>
<ion-list>
<ion-item ng-repeat="book in itmes track by $index">
{{book}}
</ion-item>
</ion-list>
<ion-infinite-scroll ng-if="loadm" on-infinite="loadMore()" distance="1%" ></ion-infinite-scroll>
</ion-content>
</body>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<link rel="stylesheet" href="css/ionic.css" />
<script type="text/javascript" src="js/ionic.bundle.min.js" ></script>
<script>
var app = angular.module("myApp",['ionic']);
app.controller("myCtrl",function($scope,$http){
$scope.itmes = ["C语言","B语言","D语言"];
$scope.loadm = false;
$scope.refreshBooks = function(){
$http({
method:"get",
url:"books.json"
}).then(function success(response){
$scope.itmes = response.data;
},function error(response){
}).finally(function(){
$scope.$broadcast("scroll.refreshComplete");
});
}
$scope.loadMore = function(){
}
});
</script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
<ion-header-bar align-title="center" class="bar-positive">
<div class="buttons">
<button class="button" ng-click="aclick();">A按钮</button>
</div>
<h1 class="title">1511k--书店</h1>
<div class="buttons">
<button class="button" >B按钮</button>
</div>
</ion-header-bar>
<ion-content>
<ion-refresher pulling-text="下拉刷新....." on-refresh="refreshBooks();"></ion-refresher>
<ion-list>
<ion-item ng-repeat="book in itmes track by $index">
{{book}}
</ion-item>
</ion-list>
<ion-infinite-scroll ng-if="loadm" on-infinite="loadMore()" distance="1%" ></ion-infinite-scroll>
</ion-content>
</body>
</html>