docs: fix HttpClient sample

This commit is contained in:
WilliamKoza 2017-07-15 10:07:50 +02:00 committed by Alex Rickabaugh
parent b0346a6e45
commit 1390afef23

View File

@ -50,7 +50,10 @@ The `get()` method on `HttpClient` makes accessing this data straightforward.
```javascript ```javascript
@Component(...) @Component(...)
export class MyComponent implements NgOnInit { export class MyComponent implements OnInit {
results: string[];
// Inject HttpClient into your component or service. // Inject HttpClient into your component or service.
constructor(private http: HttpClient) {} constructor(private http: HttpClient) {}