我是角度JS的新手,非常感谢有人帮我解决问题。我正在尝试使用ng-include指令将我的gallery.html文件绑定到index.html行类div。问题是虽然库是绑定它没有响应。这是我的代码:
<body ng-app='myApp'>
<div class='container'>
<div class='row' ng-include="'gallery.html'">
</div>
</div>
<script>
var myApp = angular.module("myApp",[]);
</script>
</body>
这是我的gallery.html代码:
<div class="col-md-4">
<div class="thumbnail">
<div class='img_container'>
<a href="#">
<img src="img/1.jpg" class="img-responsive" alt="Lights">
</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="thumbnail">
<div class='img_container'>
<a href="#">
<img src="img/2.jpg" class="img-responsive" alt="Nature">
</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="thumbnail">
<div class='img_container'>
<a href="#">
<img src="img/3.jpg" class="img-responsive" alt="Fjords">
</a>
</div>
</div>
</div> <div class="col-md-4">
<div class="thumbnail">
<div class='img_container'>
<a href="#">
<img src="img/3.jpg" class="img-responsive" alt="Fjords">
</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="thumbnail">
<div class='img_container'>
<a href="#">
<img src="img/3.jpg" class="img-responsive" alt="Fjords">
</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="thumbnail">
<div class='img_container'>
<a href="#">
<img src="img/3.jpg" class="img-responsive" alt="Fjords">
</a>
</div>
</div>
</div>