简体   繁体   English

加载数据时的AngularJS ng-grid进度栏

[英]AngularJS ng-grid progressbar when loading data

I have an angular ng-grid table, with a large amount of data. 我有一个角度ng-grid表,其中包含大量数据。 I don't know about REST API's, so my data source is from a PHP controller that sends the data via JSON. 我不了解REST API,所以我的数据源来自一个通过JSON发送数据的PHP控制器。 Some of my data requires source from a few external API's, so on every record loop, I use curl to get the data from the external API. 我的某些数据需要来自一些外部API的数据源,因此在每个记录循环中,我都使用curl从外部API获取数据。

This cause heavy loading time. 这会导致加载时间很长。 And it can't be helped. 这是无能为力的。 But what I can do is put a progressbar while the data loads. 但是我能做的是在加载数据时放一个进度条。 Is there a way to do it via angular?? 有没有办法通过角度做到这一点? or any other way. 或任何其他方式。

Thanks 谢谢

You can use Angular Loading Bar . 您可以使用Angular Loading Bar It automates the loading bar's progress, by using angular interceptors. 通过使用角度拦截器,它可以自动执行加载栏的进度。 Multiple requests within the same time period get bundled together such that each response increments the progress bar by the appropriate amount. 同一时间段内的多个请求将捆绑在一起,以便每个响应将进度条增加适当的数量。 I think this is what you need 我觉得这就是你所需要的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM