If I use es6/7 (babel - stage 1) instead of TypeScript, how are services, and specifically Http, injected?
Here\'s my component JS:
import {Compone
Method from the official API Review works for me:
import {Http, HTTP_PROVIDERS} from 'angular2/http';
@Component({
selector: 'http-app',
viewProviders: [HTTP_PROVIDERS],
templateUrl: 'people.html'
})
class PeopleComponent {
constructor(http: Http) {
http.get('people.json')
.map(res => res.json())
.subscribe(people => this.people = people);
}
}