1
테이블에 데이터를 설정하려고합니다. 나는이 같은 데이터를 검색해야하는 서비스가 있습니다AngularFire에서 데이터를 가져 오는 중 오류가 발생했습니다.
constructor(public af: AngularFire, userData: UserData) {
this.smartTableData = af.database.list('events/' + userData.user.uid +'/contacts');
}
getData(): any {
return this.smartTableData;
}
을 내 구성 요소는 다음과 같습니다 콘솔에서
constructor(protected service: SmartTablesService) {
this.service.getData().then((data) => {
this.source.load(data);
});
}
내 오류 :
zone.js:357 Error: Uncaught (in promise): Error: Error in ./SmartTables class SmartTables_Host - inline template:0:0 caused by: this.service.getData(...).then is not a function(…)