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>
타이. 나는 그것이 주석 지시문에서도 잘 작동한다는 것을 알 수있다. – Danilo
@ Danilo 나는 그것이 효과가있을 것이라고 덧붙였다. 그러나 사람들은 일반적으로 그것을 사용하는 것을 선호하지 않습니다. 그것이 당신을 도왔다면 대답을 수락하십시오 :) –
@ Danilo 알림, 대답을 받아주십시오 :) –