ng-include未被渲染后的HTML

时间:2014-10-09 15:28:05

标签: angularjs

tempHeader.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 个答案:

答案 0 :(得分:1)

您无法自行关闭代码。

<ng-include src="tempHeader.html"></ng-include>应该可以解决问题。

相关问题