Skip to content

Exposing WritableSignals in Service #20

Description

@iem365-michael

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions