You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While reading through the walkthrough, I noticed that it only provides an implementation with app.modules.ts
Since the solution is documentated here, my suggestion would be to add a code snippet in the walkthrough as well, introducing modern Angular synthax.
Suggestion
My suggestion uses the code I generated following the official walkthrough in a fresh Angular 19 repository.
Step 5
In case you are using standalone components (set to default in Angular 19), import the standalone NgRx API provideStore and the books.reducer and collection.reducer file.
Using the standalone standalone API, add the provideStore function with an argument containing an object with the books and booksReducer, as well as the collection and collectionReducer that manage the state of the book list and the collection. The provideStore function provides the gobal store providers.
Information
While reading through the walkthrough, I noticed that it only provides an implementation with
app.modules.ts
Since the solution is documentated here, my suggestion would be to add a code snippet in the walkthrough as well, introducing modern Angular synthax.
Suggestion
My suggestion uses the code I generated following the official walkthrough in a fresh Angular 19 repository.
Step 5
In case you are using standalone components (set to default in Angular 19), import the standalone NgRx API
provideStore
and thebooks.reducer
andcollection.reducer
file.Step 6
Using the standalone standalone API, add the
provideStore
function with an argument containing an object with the books and booksReducer, as well as the collection and collectionReducer that manage the state of the book list and the collection. The provideStore function provides the gobal store providers.Step 9
Step 10
Step 11
For standalone components, there are no declarations to be added inside
app.modules.ts
.Step 12
For standalone components, add the missing imports inside the
app.component.ts
instead.Documentation page
https://ngrx.io/guide/store/walkthrough
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: