http 호출을 사용하여 데이터를 가져 왔습니다. 하지만, 컴파일 시간에 위의 오류가 표시됩니다.속성이 '{}'의 Angular2에 없습니다.
user.component.ts
this._user.saveUsers(model).then(data => {
if(data.success==true){
this.router.navigate(['/user/list']);
}else{
console.log("data")
}
});
참고 : 내 객체가 동적입니다. 내 HTTP 호출에 따라
오류 :
응용 프로그램/사용자/users.component.ts (33,21) : 오류 TS2339 : 부동산의 '성공'유형에 존재하지 않는 '{}'. app/users/users.component.ts (34,38) : 오류 TS2339 : 'data'속성이 '{}'유형에 없습니다. app/users/users.component.ts (76,25) : 오류 TS2339 : 'success'속성이 '{}'유형에 없습니다.
'this._user.saveUsers (model) .then (data => {console.log (data)})'check n 콘솔에서 무엇을 얻는 지 확인하십시오 ??? – micronyks