Skip to content

BruceArmstrong007/Angular-Signals-SharedWorkers

Repository files navigation

Angular-Signals-SharedWorkers

Angular@next-v16 Trying out Shared Worker with Signals

Signalsimage

Goal :

To learn about Shared Workers (that share data between tabs and windows) and Signals that is going to be released in Angular V16

In This Example we get tp see :

1.) Component of Angular Popping in and out of window with the help of portals
2.) Same Application that can maintain its state across different windows with the help of ServiceWorker
3.) Usage of signals instead of Rxjs Subjects to Maintain State in UI. \

Takeaway :

1.) SharedWorkers are supported in main desktop browsers and can be used share data across different tabs and windows, we can also create a common state management library that works with all frameworks and across windows as well might need adoptor for different frameworks
2.) signals are just dope and exciting, first step from angular to eliminate NgZone \

Known Issues

3.) Regarding portals, when i try to create a sub window , with ComponentPortal , the styles are not applied in new window, unless it is also manually attached with selectors \

This project was generated with Angular CLI version 16.0.0-next.2.

Development server

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

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

About

Angular@next-v16 Trying out Shared Worker with Signals

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published