Expect 2-3 arguments, but have 0. Ionic 2

0

I'm developing my first application in ionic 2, and I came across this error.

I like to organize my program, so I created some templates ... I'm trying to create my page to add / edit a task in a list.

Template:

'import {EstadoTarefa} from "./estado-tarefa";
import { Observable } from "@firebase/util";
export class Tarefa{
  codigo: number;
  titulo: string;
  descricao?:string;
  state:EstadoTarefa


  constructor(codigo: number, titulo: string, descricao?: string){

    this.codigo = codigo
    this.titulo = titulo
    this.descricao = descricao
    this.state = EstadoTarefa.NOVA

  }
}
'

Add / edit page:

    import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { Tarefa } from '../../models/tarefa';
import { LovProvider } from '../../providers/lov/lov';
import { Observable } from '@firebase/util';

@IonicPage()
@Component({
  selector: 'page-cervas-add',
  templateUrl: 'cervas-add.html',
})
export class CervasAddPage {

  tarefa:Tarefa;

  constructor(public navCtrl: NavController, public navParams: NavParams, public lovProvider: LovProvider){

  }

  ionViewDidLoad() {
    this.tarefa = this.navParams.get('tarefa');
    if(!this.tarefa){
     this.tarefa = new Tarefa();
    }
  }



}
    
asked by anonymous 01.05.2018 / 07:29

0 answers