我有一个Angular应用程序,它在两列中显示“卡”(认为是Google卡)。正因为如此我结束了HTML看起来有点像AngularJS - 重复使用不带AJAX调用的HTML模板代码
<div class="leftColumn">
<div ng-repeat="module in Modules">
<span>{{module.UpTime.TotalTime}}</span>
<h2>{{module.ModuleName}}</h2>
...
</div>
</div>
<div class="rightColumn">
<!-- I want the template here too :) -->
</div>
我怎么能只写一次这样的内leftColumn
模板代码,它可以在两个leftColumn
和rightColumn
使用。注意我知道这可以用ng-include
完成,但为什么这必须是一个单独的文件,如果我想在我的当前HTML页面中指定模板,该怎么办?
可能像https://gist.github.com/whisher/0dc3f28d89cfc2a9b875是我已经被骗了:) – Whisher 2014-11-25 11:06:23