网页分页2
来源:互联网 发布:盛京时报数据库 编辑:程序博客网 时间:2024/06/05 14:29
<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link rel="stylesheet" href="lib/css/ionic.min.css" />
<script type="text/javascript" src="lib/js/ionic.bundle.min.js" ></script>
<script src="libs/angular-route.js" ></script>
<script>
angular.module('myApp',['ngRoute'])
.config(function($routeProvider){
$routeProvider.when('/1',{templateUrl:"news.html",
controller:"news"
})
.when('/2',{templateUrl:"table2.html",
controller:"demoC"
})
.when('/3',{templateUrl:"users.html"})
.otherwise({
redirectTo:'/1'
});
})
.controller("news",function($scope){
$scope.list=[{"title":"没商检","img":"img/s1.jpg","neirong":"撒发生纠纷南大街女冬张男短裤女张那个女卡萨丁女看到女的叫女可是女你倒是张加快速度几点上课上课了都快来开封的女人"},{"title":"最最卒子","img":"img/s2.jpg","neirong":"撒发生纠纷南大街女冬张男短裤女张那个女卡萨丁女看到女的叫女可是女你倒是张加快速度几点上课上课了都快来开封的女人"}];
})
.controller("demoC", function($scope, $routeParams,$filter,$http) {
var type = $routeParams.type;//分类
$http.get('sings.json').success(function(data) {
//获取json中的数据
$scope.datas = data;
//创建数组过滤器
var $f=$filter("filter");
//过滤数据,根据选择的类别,进行对应显示
$scope.sings=$f(data,{type:type});
}).error(function() {
alert("an unexpected error ocurred!");
});
})
</script>
</head>
<body ng-app='myApp'>
<div ng-view>
</div>
<div class="tabs">
<a href="#/1" >
<button style="width: 100px;" class="button button-outline button-calm">新闻</button>
</a>
<a href="#/2" >
<button style="width: 100px;" class="button button-outline button-calm">歌曲</button>
</a>
<a href="#/3" >
<button style="width: 100px;" class="button button-outline button-calm">个人信息</button>
</a>
</div>
</body>
</html>
<html >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link rel="stylesheet" href="lib/css/ionic.min.css" />
<script type="text/javascript" src="lib/js/ionic.bundle.min.js" ></script>
<script src="libs/angular-route.js" ></script>
<script>
angular.module('myApp',['ngRoute'])
.config(function($routeProvider){
$routeProvider.when('/1',{templateUrl:"news.html",
controller:"news"
})
.when('/2',{templateUrl:"table2.html",
controller:"demoC"
})
.when('/3',{templateUrl:"users.html"})
.otherwise({
redirectTo:'/1'
});
})
.controller("news",function($scope){
$scope.list=[{"title":"没商检","img":"img/s1.jpg","neirong":"撒发生纠纷南大街女冬张男短裤女张那个女卡萨丁女看到女的叫女可是女你倒是张加快速度几点上课上课了都快来开封的女人"},{"title":"最最卒子","img":"img/s2.jpg","neirong":"撒发生纠纷南大街女冬张男短裤女张那个女卡萨丁女看到女的叫女可是女你倒是张加快速度几点上课上课了都快来开封的女人"}];
})
.controller("demoC", function($scope, $routeParams,$filter,$http) {
var type = $routeParams.type;//分类
$http.get('sings.json').success(function(data) {
//获取json中的数据
$scope.datas = data;
//创建数组过滤器
var $f=$filter("filter");
//过滤数据,根据选择的类别,进行对应显示
$scope.sings=$f(data,{type:type});
}).error(function() {
alert("an unexpected error ocurred!");
});
})
</script>
</head>
<body ng-app='myApp'>
<div ng-view>
</div>
<div class="tabs">
<a href="#/1" >
<button style="width: 100px;" class="button button-outline button-calm">新闻</button>
</a>
<a href="#/2" >
<button style="width: 100px;" class="button button-outline button-calm">歌曲</button>
</a>
<a href="#/3" >
<button style="width: 100px;" class="button button-outline button-calm">个人信息</button>
</a>
</div>
</body>
</html>
阅读全文
0 0
- 网页分页2
- 网页分页
- php网页分页
- dreamweaver网页分页
- 网页前台分页算法
- 仿网页分页页码
- 网页打印分页
- 实现网页分页显示
- 网页分页插件
- 网页分页查询实例
- 网页分页table
- 网页分页,避免网页数不是数字
- 网页分页的实现类
- JSP实现网页,分页功能
- 网页前台分页算法案例
- JS-网页中分页栏
- 网页分页功能的实现
- C#网页分页标签生成
- java中for循环删除集合陷阱
- java 并发编程
- Hexo之使用Livere评论代替多说评论
- Java中return语句的作用
- selinux 系统恢复
- 网页分页2
- python最强找质数程序,寻找100000以内质数只要30秒哦!
- news新闻分页
- JavaScript基础(二)
- 欢迎使用CSDN-markdown编辑器
- Python 字符串中提取数字
- 音乐分页
- 电路实践
- 汇编---将输入的字符数字转化为二进制数据