1
に加入したデータの値を取得するにはどうすれば私は私のデータに「表示」を返すしたいの注射サービスを書き、次のように私はここはangular2
export class GetAllList {
str = localStorage.getItem('social');
loc = JSON.parse(this.str);
id = this.loc._id;
private _productUrl = 'http://localhost:3000/getprofiledetails/'+this.id;
constructor(private _http: Http) { }
getList(): Observable<IDetails[]> {
return this._http.get(this._productUrl)
.map((response: Response) => {
return response.json().data.display;
});
}
}
私が加入しています、sucessfullyそれを行ってこれに、
this._profileservice.getList()
.subscribe(
details1 => this.details1 = details1);
console.log("displaystas:"+this.details)
問題があるが、私のコンソールが未定義表示している?ので、どのように私はhelp.Thankあなた誰も私を提案することはできますか?私のコンソールの私の表示値を見ることができます。
おかげで、そのwrkngのNWを – klp