2017-02-23 2 views
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); 
    } 
    } 

});

답변

1

난 그냥 제거하시기 바랍니다 ... 그것은 이상한

thankx ... 난 컨트롤러를했다 (I 제거하는) 그것은 모든 사람을 기록했다 {{}} 사람 렌더러에서 브래킷 그것이 작동합니다

<div ng-app="CholoApp"> 
    <div ng-controller="CholoController"> 

    <person-renderer personas="items"></person-renderer> 
    </div> 
</div> 
+0

Dipak. 감사합니다. 많은 도움을! –

관련 문제