Я пытаюсь показать новый объект, который я создал на последней странице, но ошибка следующая:
AngularFirebaseObject<{}> is missing the following properties from type "Vehicle": platenumber, brand, model.
код для создания объекта описан ниже.
это мой код:
TS:
@IonicPage()
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage implements OnInit
{
private newVehicleParams: string;
ngOnInit(): void
{
this.newVehicleParams = this.params.get('newVehicleParams');
}
motolog$: Observable<any>;
constructor(
public navCtrl: NavController,
private motolog: MotoLogService,
private params: NavParams,
public vehicle: Observable<Vehicle>)
{
this.vehicle = this.motolog.getVehicle(this.newVehicleParams).snapshotChanges();
}
}
HTML:
...
<ion-item *ngIf="vehicle">
{{ vehicle.platenumber }}
{{ vehicle.brand }}
{{ vehicle.model }}
</ion-item>
...