Angular - 不更新ng-include中模板呈现的数据

时间:2014-08-04 13:26:03

标签: javascript angularjs

我有一个ng-include指令:

<div ng-include="'row_renderer.html'" onload="subItem=item"></div>

它呈现得恰到好处,但我想要实现的是通过&#34; item&#34; as&#34; subItem&#34;变量。我所做的就是诀窍,但是当范围得到更新时,它不会使用onload指令更新ng-include加载的数据。

我的代码的大部分内容:

        <ol ui-tree-nodes="" ng-model="list.results">
            <li ng-repeat="item in list.results | filter:filterByPlaceGroup | filter:filterBySubmission track by $index" ui-tree-node class="root-element" ng-class="{collapsed_root: collapsed_items[item.id]}">
                <form name="submissionForm" >
                    {% verbatim %}
                    <div ui-tree-handle class="header" style="padding-left: 8px; padding-right: 8px" ng-class="{collapsed_header: collapsed_items[item.id]}">
                        <div ng-include="'row_renderer.html'" onload="subItem=item"></div>
                    </div>
                    {% endverbatim %}
                </form>
            </li>
        </ol>

0 个答案:

没有答案