我想使用 jquery 中的columnize插件在我的 AngularJS 应用程序中设置列。我超级天真的方法是:
.directive('columnize', function() {
    return {
        restrict: 'A',
        link: function(scope, iElement, iAttrs) {
            $(iElement).columnize({columns: 2});
        }
    };
}); 
使用此 HTML 代码:
<ol class="questions" columnize>
    <li ng-repeat="question in questions" class="question">
        <span>{{question.text}}</span>
        <ul class="choices" sortable="question.choices">
            <li ng-repeat="choice in question.choices">
                {{choice}}
            </li>
        </ul>
    </li>
</ol>  
但问题是在元素内部我使用了 ng-repeat。columnize destroy 的 dom 然后 ng-repeat 抛出一个它不能 insertBefore 空元素的异常。我觉得我的方法是错误的。有什么建议么?