http://jsfiddle.net/fresheyeball/5z7bX/
<script type="text/ng-template" id="/newTrack.html">
<h1>New Track </h1>
<p>Hello there</p>
</script>
<div id="overlay" closemodal></div>
<div id="modal"><a id="closeModal" closemodal></a>
<div id="modalContent" ng-include src="/newTrack.html"></div>
</div>
我希望得到以下结果:
<div id="overlay" closemodal></div>
<div id="modal"><a id="closeModal" closemodal></a>
<div id="modalContent" ng-include src="/newTrack.html">
<h1>New Track </h1>
<p>Hello there</p>
</div>
</div>
但似乎什么也没有发生。真的,我正在尝试从自定义指令中呈现模板,在对其进行了一段时间的跟踪之后,ng-include
即使以最简单的形式,我似乎也无法开始工作。我在这里想念什么?