Replace the second sentence, "We had to create the src/app/components directory first, because the CLI doesn't make new folders for you automatically if they're missing" with the following: "The CLI will make new folders for you automatically if they're missing."
The CLI will generate a new component inside the src/app/components/summary directory. The CLI will make new folders for you automatically if they're missing. This helps organize the components into a single directory, though you could choose to generate them elsewhere.
Replace the code snippet at the end of the page with the following:
<!-- isActive() returns true or false in order to set active class -->
<h1 class="leading" [class.active]="isActive()">Title</h1>
<!-- Renders to the following -->
<h1 class="leading active">Title</h1>
In the first line of the second paragraph, add the phrase, HttpClientModule as follows:
HttpClient is part of its own module, HttpClientModule, so you have to make sure it's included in your project.
Add the following sentence to the end of the paragraph:
HttpClient is part of its own module, HttpClientModule, so you have to make sure its included in your
project. Its part of the @angular/common package, which you've probably installed,
but if not, use npm to install it. If you're using your own tooling and module loader, like
SystemJS, you'll have to ensure it's aware of this module. In your AppModule, you'll import the HttpClientModule from the @angular/common/http module and add it to your module imports array as follows:
...
import { HttpClientModule } from '@angular/common/http';
// ...
imports: [
BrowserModule,
HttpClientModule,
BrowserAnimationsModule,
ClarityModule,
],
...
Line 14 is missing the { character at the end of the line.
export class StocksInterceptor implements HttpInterceptor {
In the LiveBooks edition, comments follow the code; disregard those comments.
Lines 9 and 10 are the same; delete one.
> alert(message: string, type: string = 'info', autohide: number = 5000) {
Replace line 8 on page 155 with the following:
.subscribe((params: Query) => {