Skip to content

Commit 2bc7c64

Browse files
committed
Add speaker notes
1 parent a470574 commit 2bc7c64

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ng-services/index.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,19 @@ <h2 class="no-text-transform">A Service is...</h2>
9191
</section>
9292
<section>
9393
<p class="no-text-transform">Component consumes a service making use of the <span class="highlight">Dependency Injection</span></p>
94-
<pre><code class="hljs typescript" data-trim data-noescape>
94+
<pre><code class="hljs typescript" data-trim data-noescape data-line-numbers="|5">
9595
@Component({...})
9696
export class BookOverviewComponent{
9797
books$ = this.bookService.findAll();
9898

99-
constructor(private <mark>bookService: BookService</mark>) {}
99+
constructor(private bookService: BookService) {}
100100
}
101101
</code></pre>
102+
<aside class="notes">
103+
Note the access modifier "private" in the constructor parameters. <br>
104+
bookService will be injected during instantiation by Angular. <br>
105+
bookService can be used like a usual member variable.
106+
</aside>
102107
</section>
103108
<section>
104109
<section id="summary">

0 commit comments

Comments
 (0)