Hi! Thanks for your attention!

By 'moving' i mean reordering of DOM elements which is implicitely done by ngRepeat directive when the order of elements in collection changes.

For example:

<a ng-click="shuffleWidgets()">Shuffle</a>
<div ng-repeat="widget in widgets">
    // Render widget with TinyMCE iframe inside
</div>

function controller($scope) {

   widget1 = new Widget();
   widget2 = new Widget();

   $scope.widgets = [widget1, widget2];

   // On some event:
   $scope.shuffleWidgets = function() {
       // Change the order of widgets to [widget2, widget1]
       $scope.widgets[0] = [widget2];
       $scope.widgets[1] = [widget1];

       // ng-repeat will automatically reorder DOM elements, but
       // iframes inside TinyMCE's will get reset because of this
       // and i need to initialize them once again somehow when the
       // reordering finishes
   }
}

On 02/20/2014 11:39 AM, Sander Elias wrote:
Hi Ivan,

Can you define 'moved in the DOM' for me? do you mean user-scroll? Do
you mean dome elements get inserted before/after? Do you mean when it's
inserted/removed itself?
do you mean drag&drop your widgets around?

Regards
Sander

--
You received this message because you are subscribed to a topic in the
Google Groups "AngularJS" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/angular/sgeTMuZCXyQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
[email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to