Answer the question
In order to leave comments, you need to log in
How to use Http in angular2 entities?
How to correctly use Http in User if User is not Injectable
export class User {
name: string;
email: string;
constructor(userInfo:any) {
this.name = userInfo.name;
this.email = userInfo.email;
}
save() {
// Здесь Http
//this.http.post('url', this);
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question