angularjs - How to access parent scope in directive on nested ng-repeat -


simple question unable find why in template, format-property directive can not access device?

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

althought template 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 , scope.$parent.device without success. here demo

edit

i can access property not device. unlike this question, have nested ng-repeat

here new demo isolated scope

see plunker

i think must add td inside tr or can use div.

also can check this link more details.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -