问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/52029035/web-workers-in-angular-6