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。谢谢你的帮助! –