这是问题所在: 输入'{id:any; IdCliente:任意; idvendedor:任何; Fecha:任何; }”缺少类型“ Dev”中的属性:idCliente,idVendedorts(2739)
我该怎么办? 在ventas.page.ts
textFields
无法识别出venta上方的错误: 输入'{id:any; IdCliente:任意; idvendedor:任何; Fecha:任何; }”缺少类型“ Dev”中的以下属性:idCliente,idVendedorts(2739)
import { DatabaseService, Dev } from './../../services/database.service';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ToastController } from '@ionic/angular';
@Component({
selector: 'app-venta',
templateUrl: './venta.page.html',
styleUrls: ['./venta.page.scss'],
})
export class ventaPage implements OnInit {
venta: Dev = null;
// id = '';
constructor(private route: ActivatedRoute, private db: DatabaseService, private router:
Router, private toast: ToastController) { }
ngOnInit() {
this.route.paramMap.subscribe(params => {
let devId = params.get('id');
this.db.getVentas(devId).then(data => {
this.venta = data; // **here is the error**