0
我想知道爲什麼我的人集合在此指令渲染:角度收集爲什麼不渲染模板
http://codepen.io/agustincba/pen/vgOLVV
modulo.directive('personRenderer', function(){
return {
restrict: 'E',
template: `
<table>
<thead>
<tr>
<td>Nombre</td>
<td>DNI</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="person in personas">
<td>{{person.name}}</td>
<td>{{person.dni}}</td>
</tr>
</tbody>
</table>
`,
replace: true,
scope: {
personas: '='
},
controller: function($scope)
{
console.log($scope.personas);
}
}
});
thankx ......我做了一個控制器(我刪除),它是記錄所有的人......這很奇怪......
Dipak。謝謝你的幫助! –