I want to use the columnize plugin from jquery to set up columns in my AngularJS app. My super naive approach was:
.directive('columnize', function() {
return {
restrict: 'A',
link: function(scope, iElement, iAttrs) {
$(iElement).columnize({columns: 2});
}
};
});
With this HTML code:
<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>
The problem though is that inside the element I use ng-repeat. columnize destroy's the dom and then ng-repeat throws an exception that it can't insertBefore null elements. I feel like my approach is just wrong. Any suggestions?
...
`. – John Doe Nov 14 '12 at 09:50