deeleman / learning-angular2

Code samples repository for the examples provided in "Learning Angular 2", published by Packt Publishing - THE BOOK COVERS UP TO RC.1 and hence is severely OUTDATED. PLEASE REFER TO THE LATEST EDITIONS INSTEAD.
https://www.packtpub.com/web-development/learning-angular-2
108 stars 59 forks source link

Chapter 6 Section 4 Importing HTTP_PROVIDERS #33

Closed RichLinnell closed 8 years ago

RichLinnell commented 8 years ago

Once we start changing the service you state that the HTTTP_PROVIDERS (note, there is a typo) has already been injected at the top root component. We never actually are instructed to make that change in the book. I assume that we need the following in app.component.ts

import {HTTP_PROVIDERS} from '@angular/http'; and then in the providers providers: [SHARED_PROVIDERS, HTTP_PROVIDERS],

deeleman commented 8 years ago

It is actually instructed on page 177 ;)