Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ng-grid paging
Message
De
27/10/2014 02:10:33
 
 
Information générale
Forum:
Javascript
Catégorie:
Autre
Titre:
Divers
Thread ID:
01609778
Message ID:
01609952
Vues:
36
>>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();
        }
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform