Note that there are some explanatory texts on larger screens.

plurals
  1. POAngular ng-repeat and jQuery plugin
    primarykey
    data
    text
    <p>I'm trying to turn <a href="http://jsfiddle.net/MattiasBuelens/ExxaU/" rel="nofollow">this jQuery plugin</a> into an Angular directive. I did the following:</p> <pre><code>define(['directives/directives'], function(directives){ directives.directive('vivifysortable', ['$rootScope', function ($rootScope){ return { controller: function ($scope, $element, $attrs){ // here i pasted definition of multiselectable, //and multisortable from the above jsfiddle }, link: function($scope, $element, $attrs) { if ($scope.$last === true) { setTimeout(function() { angular.element($element).multisortable({ connectWith: ".product-backlog-column", selectedClass: "ui-selected" }); }) } } } }]); }); </code></pre> <p>And this works fine if I have something like this</p> <pre><code> &lt;ul class="product-backlog-column" vivifysortable &gt; // some hardcoded values for testing purposes &lt;li&gt; test 1 &lt;/li&gt; &lt;li&gt; test 2 &lt;/li&gt; &lt;li&gt; test 3 &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>But in case I use <code>ng-repeat</code> , looks like it doesn't work at all</p> <pre><code>&lt;ul class="product-backlog-column" vivifysortable &gt; &lt;li ng-repeat='item in items'&gt; {{item.title}} &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>It looks like, ng-repeat` is giving me hard times, but I'm not sure why, and how I can fix it.</p> <p>Here's the <a href="http://jsfiddle.net/rqARD/34/" rel="nofollow">jsfiddle</a> for this (I'm not sure if I created it properly, by including Angular onLoad and jQuery as external resources).</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload