一、在ionic官网出现版本升级之后,以下几个方面出现更新,在使用中进行相关记录,以便后续使用方便。 1、form表单提交:前者为10版本,后者为11版本 ngControl="shootTitle" => formControlName="shootTitle";
<form (submit)="processForm($event)" [formGroup]="shootForm"> => <form (submit)="processForm($event)" [ngFormModel]="shootForm">
2、弹出框的使用方式: Toast => ToastController Loading => LoadingController
还有一些,后期使用再补上。
二、必须使用的细节 1、关闭无网络无数据返回时的假死; this.customerService.addReply(this.replyData).subscribe( data => { uploading.dismiss(); if (data.result=="SUCCESS") {
} else {
Toasts.showShort(this.toastCtrl, '评论失败,请重试!');
}
},
** error => {
uploading.dismiss();
Toasts.showShort(this.toastCtrl, '评论失败,请重试!');
},
()=> {
uploading.dismiss();
}**
);