Angular: Empty Fiddle
http://angularjs.org/
by mrajcok
HTML
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<script src="https://raw.github.com/adamwulf/Columnizer-jQuery-Plugin/master/src/jquery.columnizer.js"></script>
<div ng-controller="MyCtrl">
<ol columnize class="questions" sortable="questions">
<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>
</div>
JavaScript
var myApp = angular.module('myApp', [])
.directive('columnize', function($timeout) {
return {
restrict: 'A',
link: function(scope, iElement, iAttrs) {
$timeout(function() {
iElement.columnize({columns: 2}), 0
});
}
};
});
function MyCtrl($scope) {
$scope.questions = [
{ text: 'Q1', choices: [1, 2, 3]},
{ text: 'Q2', choices: [1, 2, 3]},
{ text: 'Q3', choices: [1, 2, 3]}
]
}