docs: fix HttpClient sample
This commit is contained in:
parent
c6ad212a98
commit
9f99f4fae2
|
@ -50,7 +50,10 @@ The `get()` method on `HttpClient` makes accessing this data straightforward.
|
|||
|
||||
```javascript
|
||||
@Component(...)
|
||||
export class MyComponent implements NgOnInit {
|
||||
export class MyComponent implements OnInit {
|
||||
|
||||
results: string[];
|
||||
|
||||
// Inject HttpClient into your component or service.
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
|
|
Loading…
Reference in New Issue