After checking angular 2 release updates I see where the problem comes from: in RC5 --> "core: ensure ngFor only inserts/moves/removes elements when necessary"
I compared my projects RC4 and 2.0.1 and all elements are updated only in RC4 (as expected) * there is a way to bypass this? and have all DOM elements updated after change in ngfor under 2.0.1 ??* Le lundi 3 octobre 2016 17:13:28 UTC+2, SLV SNZ a écrit : > > *After I updated my angular 2 project from RC4 to 2.0.1 I'm having a > problem with a ngFor looping on an array of objects* (It was working fine > on RC4) > > the list of elements is not being updated properly on the DOM, and now > displayed unsorted . > the ngFor uses a pipe to slice the array (using the start and stop bounds). > the section displayed is updated each time we move the two bounds (start/ > stop). > > > *Steps to reproduce the bug /issue:* > here is the plunkr: https://embed.plnkr.co/aHIZKq/ > > 1. Move the start / stop bounds through the middle > 2. Then move the draggable bar to the left / right. You'll see the > elements displayed are being updated. > 3. At some point if you move to the left you'll see the elements being > unsorted/mixed. > 4. I added on console log the id index from ngLoop. so you can see its > unsorted when the problem occurs > > > > I tried several changes on code, but nothing worked: > > - using a copy on the object > - using an array with the keys... > > > > thank you for your help > -- 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 https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
