AngularJS, changing the data in a view without div disappearing

Posted by Jascination on Stack Overflow See other posts from Stack Overflow or by Jascination
Published on 2013-10-28T03:38:54Z Indexed on 2013/10/28 3:54 UTC
Read the original article Hit count: 146

Filed under:
|

I'm making a little wizard/survey in AngularJS which loads in data to a variable, $scope.styles. I've set up a plunkr for ease of use here:

http://plnkr.co/edit/1S542YE7xlO2P4zyhzu0?p=preview

Pretty simple. I show each object to the user in succession, which loads in the pertinent images and displays them for the user. clicking "yes/no" at the bottom of the images it loads in the next gallery. There is a big of lag between the refresh here (Plunkr seems to be loading it quite quickly, but this is not the case on my production server so it's even more noticable) which causes the window size to momentarily be much smaller plus all the content below the ng-repeat jumps to the top of the screen.

What's the best way to prevent this from happening? Is CSS the only solution here?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about angularjs