2014-10-09 90 views
0

tempHeader.html渲染得很好,但渲染似乎停止了?ng-include沒有被渲染後的html

我錯過了什麼?

<!DOCTYPE html> 
<html ng-app> 
<head> 

    <!-- Angular JS Latest compiled and minified JavaScript --> 
    <script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script> 

</head> 

<body> 
    I am here 

    <ng-include src="'tempHeader.html'"/> 

    I am also here <!-- not rendered --> 

</body> 
</html> 

回答

1

您不能關閉標籤本身。

<ng-include src="tempHeader.html"></ng-include>應該做的伎倆。

+0

做到了,謝謝! – 2014-10-09 15:45:19