2017-05-05 1 views
0

영어로 죄송합니다. 모달에서 여러 데이터를 가져 오려고하지만이 방법은 효과가 없습니다. 이오니아 2 모달 복수 데이터

는 modal.ts의 코드입니다 :

anadir() { 
    this.viewCtrl.dismiss(this.cantidad, this.idpedido, this.posicion); 
    } 

이것은 page.ts의 코드 다음에 대한

myModal.onDidDismiss(data => { 
    this.idpedido = data.idpedido; 
    this.cantidad = data.cantidad; 
    this.posicion = data.posicion; 
    console.log(data) 

    }); 

내가 "정의"입니다 얻을 데이터, 감사 도움. 대신에 세 가지 다른 속성을 보내는

답변

0

, 당신은 다음과 같이 세 가지 속성으로 하나의 객체를 전송하여 시도 할 수 있습니다 :

anadir() { 
    this.viewCtrl.dismiss({ 
     idpedido: this.idpedido, 
     cantidad: this.cantidad, 
     posicion: this.posicion 
    }); 
} 
+1

이 작품! 고마워요 :) –

+0

도와 줘서 고마워. :) – sebaferreras