Skip to content

Commit

Permalink
docs: update and edit web-worker page (angular#36383)
Browse files Browse the repository at this point in the history
PR Close angular#36383
  • Loading branch information
jbogarthyde authored and kara committed Apr 1, 2020
1 parent 24a9247 commit 4d458db
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions aio/content/guide/web-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
freeing the main thread to update the user interface.
If you find your application performs a lot of computations, such as generating CAD drawings or doing heavy geometrical calculations, using web workers can help increase your application's performance.

<div class="alert is-helpful>
<div class="alert is-helpful">

The CLI does not support running Angular itself in a web worker.

Expand All @@ -19,9 +19,6 @@ To add a web worker to an existing project, use the Angular CLI `ng generate` co
You can add a web worker anywhere in your application.
For example, to add a web worker to the root component, `src/app/app.component.ts`, run the following command.

`ng generate web-worker app`.


The command performs the following actions.

- Configures your project to use web workers, if it isn't already.
Expand Down Expand Up @@ -52,7 +49,7 @@ The command performs the following actions.

After you generate this initial scaffold, you must refactor your code to use the web worker by sending messages to and from the worker.

<div class="alert is-important>
<div class="alert is-important">

Some environments or platforms, such as `@angular/platform-server` used in [Server-side Rendering](guide/universal), don't support web workers. To ensure that your application will work in these environments, you must provide a fallback mechanism to perform the computations that the worker would otherwise perform.

Expand Down

0 comments on commit 4d458db

Please sign in to comment.