ts(2739)我正在尝试使用ionic和Sqlite做一个应用程序,但是我有这个问题,这是我的第一个应用程序

时间:2019-10-23 16:45:31

标签: angular typescript sqlite ionic-framework

这是问题所在: 输入'{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**

0 个答案:

没有答案