![](/img/trans.png)
[英]How to access to the controller scope from a directive inside ng-repeat?
[英]how to access outer scope inside the ng-repeat in a directive
我在链接函数中有一个指令,我在'ng-repeat'中需要访问一个范围变量。 但这并没有增加价值。
我尝试使用$ parent也经历了几个答案,但仍然行不通。
这是我尝试的:
HTML:
<div ng-controller="MyCtrl">
<div my-directive ng-repeat="item in items" item='item'></div>
</div>
小提琴链接:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.