platform
platform copied to clipboard
Walkthrough
Information
Following the walkthrough at https://ngrx.io/guide/store/walkthrough does not yield a working end result.
Starting from https://ngrx.io/generated/live-examples/ngrx-start/stackblitz.html and following the instructions results in errors. The link to the already completed example https://ngrx.io/generated/live-examples/store-walkthrough/stackblitz.html however does work correctly.
The difference is in extra import statements in 'app.module.ts', more specifically sections
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpClient, HttpClientModule } from '@angular/common/http';
and
import { AppComponent } from './app.component';
import { BookListComponent } from './book-list/book-list.component';
import { BookCollectionComponent } from './book-collection/book-collection.component';
are not mentioned.
I would suggest to add these in the walkthrough at the appropriate places, such that this tutorial can readily be used by beginners as well.
Documentation page
https://ngrx.io/guide/store/walkthrough
I would be willing to submit a PR to fix this issue
- [ ] Yes
- [ ] No
Good catch @stefaanderoeck , feel free to create a PR with the needed changes.
I'd like to take this one if that's ok?
Sure @jrstrayhorn! :)
@markostanimirovic - I noticed the store walkthrough app didn't work without CommonModule (b/c of ngFor and async pipe) so added instruction around that as well as addressing the missing imports. Plus removed HttpClient import from app.module.ts as it's not needed.
@markostanimirovic - I noticed the store walkthrough app didn't work without CommonModule (b/c of ngFor and async pipe) so added instruction around that as well as addressing the missing imports. Plus removed HttpClient import from app.module.ts as it's not needed.
Hi @jrstrayhorn 👋
BrowserModule
already re-exports CommonModule
so we don't need to explicitly add it. I just checked the current version of the store walkthrough app and it worked: https://stackblitz.com/edit/angular-9arttf?file=src%2Fapp%2Fapp.module.ts