ionic,使用push打开子页面,子页面传递数据给父页面!!!!!!

找了一天终于搞好了

父页面代码片段,不要怀疑

// 打开个人信息
openCreatPersoninfo() {
new Promise((resolve, reject) => {
this.navCtrl.push('UserInfomation', { resolve: resolve });
}).then(d => {
// console.log(d)
// this.currentUser.headimgUrl = d;
this.headimgUrl = d;
// console.log(this.headimgUrl)
})

}


子页面代码片段

ionic,使用push打开子页面,子页面传递数据给父页面!!!!!!

参考链接:https://blog.csdn.net/zf_hacjox/article/details/64443442