Skip to content

nagarsuresh/rxify-worker-angular

Repository files navigation

Known Vulnerabilities

RxifyWorkerAngular

Using RxJS to communicate with webworker in angular application.

Consumer Code

const rxify = new RxifyWorker(new Worker('...'));
rxify.sendMessage('hello').subscribe(msg => console.log(msg));

Exposing Worker

 const r = new RegisterWorker();
 r.handleMessages((msg)=>{
  const s = new Subject();
  setTimeout(()=> {
    s.next('Hello World!');
    s.complete();
  })
  return s.asObservable();
 });


Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.

Demo

Consumer

Explanation

https://naagarsuresh78.medium.com/rxify-webworker-communication-in-angular8-b0cddbdcf2e

About

rxify-worker-angular

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published