Demo application for trying Angular Signals introduced in Angular 16.
To learn about Signals, see
Conversation is a sequence of related application pages that share a common state. For example:
- search form
- search result list
- single result detail
When you enter a conversation, you usually want a clean state and to preserve it while navigating the conversation. For example, when you return from a detail page to the result list, you want to see the same list as was displayed before.
In this demo application, there is one conversation implemented by FirstConversationComponent
with two subpages.
The conversation component contains a router-outlet
and is a navigation parent for its subpages.
When we leave the conversation route space, the conversation component gets destroyed along with its state service (provided by it).
A conversation can probably be implemented by an Angular module too.
Based on the video of Joshua Morony My NEW default for state management in Angular.
This demo has one state service - FirstConversationStateService
. This state service is based on Signals.
It's not as sophisticated as NGRX Component Store but it's much simpler and easier
to implement and understand.
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.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.