I have a class User
that does not have any NG2 metadata, etc.. But I would like to have it access Http
from "@angular/http"
. What is the best way to bring this class into the NG DI provider/injector system so that I can access Http
?
I'm going for something like the following:
import {Http, Response} from "@angular/http"
export class User {
constructor(private _email:string){}
public reload(){
this.http.get("http://www.example.com")
.subscribe(...)
}
}