首页 > Web开发 > 详细

AngularJS ng-include

时间:2015-06-03 19:43:09      阅读:320      评论:0      收藏:0      [点我收藏+]

index.html

<html lang="en" ng-app="single_view">
<head>
  <script src="../jslib/angular.js"></script>
  <script src="../jslib/angular-route.js"></script>
   <script src="app.js"></script>
</head>
<body>

	<h4>below is the a page informaiton</h4>
	<div ng-include="‘view/a.html‘"></div>


	<h4>below is the b page informaiton</h4>
	<div ng-include="‘view/b.html‘"></div>

</body>
</html>


app.js

angular.module(‘single_view‘, []);


view/a.html

A page ...


view/b.html

B page ...

:<div ng-include="view/b.html"></div> 要加单引号

AngularJS ng-include

原文:http://antlove.blog.51cto.com/10057557/1658003

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!