I am trying to create a web worker before my application bootstraps. it fetches some data before angular starts building. That way we can use the time it takes for angular to build to fetch a large amount of data. I am thinking of doing this on an ng build script. I can run my ..
Category : web-worker
Is it possible to create a web worker in a plain js file. No html no nothing. just a simple Angular ng build script? Source: Angular..
I am trying to create a web worker outside of the DOM. that fetches some data before angular starts building. That way we can use the time it takes for angular to build to fetch a large amount of data. I am thinking of doing this on an ng build script. But I am having ..
Is there any way of starting a web-worker on angular’s build script. I want to start loading files when angular is building to save up some time. I am wondering if this is possible? and how would I go about doing that? Source: Angular..
Here is my code: const worker = new Worker(‘./app.worker.ts’, { type: ‘module’ }); console.log(‘this is the worker’); console.log(worker); worker.onmessage = ({ data }) => { console.log(`page got message: ${data}`); }; worker.postMessage(‘hello’); It is having trouble on that first line. If I remove the {type: ‘module’} it does not give me the error (but it also ..
I keep getting the following error: No template for dependency: ConstDependency When using web workers Here is my code: const worker = new Worker(‘./app.worker.ts’, { type: ‘module’ }); console.log(‘this is the worker’); console.log(worker); worker.onmessage = ({ data }) => { console.log(`page got message: ${data}`); }; worker.postMessage(‘hello’); It is having trouble on that first line. If ..
Whenever I try to do: ng g web-worker canvas I keep getting Cannot find base TypeScript configuration file ‘tsconfig.base.json’. I look through my files and I indeed don’t have a tsconfig.base.json I have tried to find other chains that explain how to do it but I have not had any luck. I think it is ..
I am using Angular (last version i guess) well all work perfectly but when i add this ligne in my PlanetMaterialManager class angular will just compile but no making any changes in the broswer. const { heightDataResult, specularDataResult, diffuseDataResult } = await TextureBuilder.buildTextures(hashStringToInt(this.options.terrainSeed), this._noiseSettings, heightMapImage, specularMapImage, diffuseMapImage) the class code : const backgroundWorker = require(‘worker-loader!./TextureBuilder.worker’) ..
I am updating an angular app to use web workers. I am trying to follow this guide: guide But when I try this: ng generate web-worker app I get the following error Invalid project name (project-ui) Anyone knows why? Source: Angular..
I want to write a spec.ts in an Angular project to test the code of a web worker. I have written the code of the web worker in a typescript class that have some methods. I tried the way I run all the Angular tests, but it didn’t work. Any ideas? Source: Angular..
Recent Comments