Können Sie mir bitte helfen, dieses Problem zu lösen:Angular 2 und Firebase werfen ThenableReference Ausnahme auf Formular
ERROR in /src/app/services/firebase.service.ts (33,12): Type 'ThenableReference' is not assignable to type 'Promise<any>'.
Property '[Symbol.toStringTag]' is missing in type 'ThenableReference'.)
webpack: Failed to compile.
Mein Code in Service:
addBusiness(newBusiness): Promise<any>{
return this.businesses.push(newBusiness);
}
und Codes in der Komponente:
addBusiness(
company:string,
category:string,
years_in_business:number,
description:string,
phone:string,
email:string,
street_address:string,
city:string,
state:string,
zipcode:string
){
var created_at = new Date().toString();
var newBusiness = {
company: company,
category: category,
years_in_business:years_in_business,
description:description,
phone:phone,
email:email,
street_address:street_address,
city:city,
state:state,
zipcode:zipcode,
created_at:created_at
}
this._firebaseService.addBusiness(newBusiness);
this.changeState('default');
}
Hey, hast du es geschafft, das zu lösen? Ich habe das gleiche Problem ? – bobin56