Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing WritableSignals in Service #20

Open
iem365-michael opened this issue Oct 15, 2024 · 0 comments
Open

Exposing WritableSignals in Service #20

iem365-michael opened this issue Oct 15, 2024 · 0 comments

Comments

@iem365-michael
Copy link

Hi Deborah, firstly thank you for another fabulous course.

I just wanted to query exposing writable signals from a service, for example selectedProductId in the product service. It feels this would be best fully encapsulated within the service:

`private _selectedProductId = signal<number | undefined>(undefined);

readonly selectedProductId = this._selectedProductId.asReadonly();`

Thanks again for all you contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant