Page Stop functions before close button modal


#1

hello, i have problem with modal, my modal work normal, but when i open modal and click in button close, stop all my function in page.
fechar() = button close, before this stop to work, editar() and salvar(). and not return any error.

Page

import { Component } from '@angular/core';
import { ModalController, NavParams } from 'ionic-angular'
import { conta } from '../conta/conta'
//import { DAOagenda } from '../../app/dao/DAOagenda'

@Component({
  selector: 'agenda',
  templateUrl: 'agenda.html'
})

export class agenda {
  dao:any; 
  items: any[];
    constructor(public modalCtrl: ModalController) {
      //this.dao = new DAOagenda('');
      //this.items = this.dao.getList();
      this.insert();
      console.log(this.items)
    }

    presentProfileModal() {
      let profileModal = this.modalCtrl.create(conta);
      profileModal.onDidDismiss((data) => {
        this.items.push(data)
      })
      profileModal.present();
  }
  insert() {
    this.items = [
      {
        descricao: "Spiga"
      },
      {
        descricao: "spiga2"
      },
      {
        descricao: "spiga3"
      }
    ];
  }
  editar(data) {
    let profileModal = this.modalCtrl.create(conta, {parametro: data});
      profileModal.onDidDismiss((data) => {
        this.items.push(data)
      })
      profileModal.present();
  }
}

class Profile {

 constructor(params: NavParams) {
   console.log('UserId', params.get('userId'));
 }


}

Modal


import { Component } from '@angular/core';
import { NavController, NavParams,ViewController } from 'ionic-angular';

@Component({
  selector: 'conta',
  templateUrl: 'conta.html',
})
export class conta {
  conta: any;
  descricao: any;
  constructor(public navCtrl: NavController, public navParams: NavParams, public ViewCtrl: ViewController) {
      this.conta = this.navParams.get("parametro") || {descricao: ""};
  }

  
  fechar() {
    this.ViewCtrl.dismiss();
  }
  salvar() {
    this.ViewCtrl.dismiss(this.conta);
  }
}