0

Simple question but i unable to find why in this template, the format-property directive can not access to device?

<table>
    <tr ng-repeat="device in devices">
        <format-property ng-repeat="property in properties"></format-property>
    </tr>
</table>

althought with this template it works:

<table>
    <tr ng-repeat="device in devices">
        <td ng-repeat="property in properties">
            <format-property></format-property>
        </td>
    </tr>
</table>

I tried scope.device and scope.$parent.device without success. Here my demo

Edit

I can access to property but not to device. Unlike this question, i have a nested ng-repeat

Here a new demo with an isolated scope

Community
  • 1
  • 1
Troopers
  • 5,127
  • 1
  • 37
  • 64

1 Answers1

0

see plunker

I think you must add td inside tr or you can use div.

Also you can check this link for more details.

Community
  • 1
  • 1
Mansi Parekh
  • 519
  • 2
  • 13