-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathangularjs_nginclude.html
More file actions
52 lines (51 loc) · 1.73 KB
/
angularjs_nginclude.html
File metadata and controls
52 lines (51 loc) · 1.73 KB
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
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8">
<title>AngularJS·Hello AngularJS</title>
<link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.2/css/bootstrap.css">
<style>
.demo{
margin-bottom:10px;
border-bottom:1px solid #1b926c;
}
/*.navbar{*/
/*border:1px solid #1b926c;*/
/*background-color: #1fa67a;*/
/*}*/
</style>
</head>
<body>
<div class="container">
<div class="row">
<nav class="navbar navbar-default navbar-static-top">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../index.html">首页</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="javascript:void(0)">Link</a></li>
<li><a href="javascript:void(0)">Link2</a></li>
</ul>
</div>
</nav>
</div>
<h3>ng-include示例</h3>
<div class="row text-center demo">
<div ng-include src="'tpl_header.html'"></div>
<article style="min-height:300px;">
我是内容区域
</article>
<div ng-include src="'tpl_footer.html'"></div>
</div>
</div>
</div>
</body>
</html>
<script src="http://cdn.bootcss.com/angular.js/1.3.8/angular.js" type="text/javascript"></script>
<script type="text/ng-template" id="tpl_header.html">
<header class="row" style="padding:10px;background:darkolivegreen;">我是头部</header>
</script>
<script type="text/ng-template" id="tpl_footer.html">
<footer class="row" style="padding:30px;background:#999;color:#fff;">我是底部</footer>
</script>