Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ng-grid paging
Message
 
 
General information
Forum:
Javascript
Category:
Other
Title:
Miscellaneous
Thread ID:
01609778
Message ID:
01609962
Views:
35
>>>Trying things at random means you are just thrashing around. If something doesn't work then debug 'till you find out why - then look for the solution.
>>
>>Ok, looks like I got the answer on stackoverflow:
>>
>>http://stackoverflow.com/questions/26536362/angularjs-ng-grid-shows-blank-grid-first
>>
>>It does indeed sound like the resizing problem as switching between dev. tools and back causes resize and also 2 accounts correctly show up right away (but not others).
>>
>>Adding $(window).trigger('resize'); at the end of the load procedure fixed the problem for me. Now when this guy explained that problem, it seems quite obvious that it was indeed the problem with resizing.
>
>>UPDATE. I re-introduced the paging back, all as well now.
>>
>>Well, thanks to that guy in stackoverflow for the answer!
>
>It's certainly not 'a problem with resizing' - resizing is a hack that probably works because it runs a digest. I'd bet the real problem is that your code is not triggering the digest.. In fact, looking closely, your implementation of 'setPagingData() differs from the plunkr :
if (!$scope.$$phase) {
>            $scope.$apply();
>        }
I believe my code was exactly the same as plunker's code. Also, I was trying to add $scope.$apply() and the end of the load procedure in addition to that code and it had no effect.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform