角度 6 中的网络工作者 [英] Web workers in angular 6

查看:30
本文介绍了角度 6 中的网络工作者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 angular 6.我想在我的网格中加载 100 行,但这 100 行包含大量数据,因此在我的 angular 应用程序中加载这些数据时,它会挂起浏览器.

所以目前我使用远程分页改为每页 20 行.

但我需要在我的应用程序中加载 100 行.所以我尝试实现 WebWorkers.但我没有找到任何例子.

谁能给我在 angular 6 中实现 WebWorkers 的示例或步骤

此外,我对动态表单使用反应式表单数组.在此,我在编辑表单上加载了 50 多个下拉字段,当时浏览也会挂起.我也需要这个表格阵列的解决方案.

解决方案

您可以找到有关在 Angular 应用程序中集成 Web Worker 的有用演示:

SlideShare :- Angular 应用程序中的 Web workers- 不同方法

Github :- Angular 6 中 Web Worker 演示的示例代码

文章 :- 在 Web Worker 中运行 Angular 6 应用程序

希望这些链接能帮助您了解在 Angular 应用中使用 Web Worker 的不同方法,并选择最适合您的项目和用例的方法.

I am using angular 6. I want to load 100 rows in my grid but this 100rows contains lots of data so while loading this data in my angular application it's hangs the browser.

So currently I changed into 20rows per page I am using remote pagination.

But I have a requirement to load 100rows in my application. So I tried to implement the WebWorkers. But I didn't find any examples.

Can someone give me the example or steps to implement WebWorkers in angular 6

Also I am using reactive formarray for dynamic forms. In this I am loading more than 50 drop-down fields on edit form that time also browse hangs. I need a solution for this formarray also.

解决方案

You can find a useful presentation that talks about integrating web workers in your angular application:

SlideShare :- Web workers in your Angular Application- Different Approaches

Github :- Sample Code from presentation for Web Worker in Angular 6

Article :- Running your Angular 6 application in Web Worker

Hope these links will be helpful for you to understand different approaches for using web worker in angular app and choose the one that best fit for your project and use case.

这篇关于角度 6 中的网络工作者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆