2014-10-09 88 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