-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathindex.html
54 lines (46 loc) · 1.22 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!doctype html>
<html lang="zh-cn" ng-app="app">
<head>
<meta charset="UTF-8">
<title>Mock.js demo</title>
</head>
<style>
body {
color: #545454;
}
h1, p {
text-align: center;
}
ul {
text-align: left;
list-style: none;
display: inline-block;
border-top:1px solid #eee;
border-radius: 5px;
box-shadow: 0 1px 2px #555;
text-shadow: 0 1px 1px #000;
margin:8px;
padding: 5px 8px;
}
ul li {
color: #fff;
margin: 5px 8px;
}
</style>
<body ng-controller="appCtrl">
<h1>Mock.js demo</h1>
<hr/>
<p><button ng-click="get()">伪装发送http请求</button></p>
<ul ng-repeat="item in box" style="background: {{item.color}}">
<li>{{item.name}}</li>
<li>{{item.age}}</li>
</ul>
<script src="http://mockjs.com/dist/mock-min.js"></script>
<script src="http://cdn.staticfile.org/angular.js/1.3.0-beta.13/angular.min.js"></script>
<!-- 兼容angular -->
<script src="./src/mock.angular.js"></script>
<!-- 我把模拟数据都写在这个文件夹里了 -->
<script src="./mockData.js"></script>
<script src="./index.js"></script>
</body>
</html>