2
我在表格中有简单的角度指令,但它在表格之前呈现。角度指令不在正确的位置
app.directive('myDirective',function() {
return {
restrict : "E",
templateUrl : "directives/myDirectiv.html",
replace : true
}
})
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Deposit</th>
<th>Credit Card</th>
</tr>
</thead>
<tbody>
<my-Directive></my-Directive>
</tbody>
</table>
<!-- here is html in the directive -->
<tr>
<td>001</td>
<td>Danilo</td>
<td>7163547265</td>
<td>Visa</td>
</tr>
如何解决它是在正确的地方。 Ty提前。
泰快速的答案。我看到这个评论指令也很好。 – Danilo
@Danilo我看到评论它会工作。但人们通常不喜欢使用它。接受答案,如果它确实帮助你,谢谢:) –
@达尼洛提醒,请接受答案:) –