ionic2.0.10升级至11版本以后的变化

1、在ionic官网出现版本升级以后,如下几个方面出现更新,在使用中进行相关记录,以便后续使用方便。 一、form表单提交:前者为10版本,后者为11版本 ngControl="shootTitle" => formControlName="shootTitle";网络

<form (submit)="processForm($event)" [formGroup]="shootForm"> => <form (submit)="processForm($event)" [ngFormModel]="shootForm">ionic

二、弹出框的使用方式: Toast => ToastController Loading => LoadingControllerthis

还有一些,后期使用再补上。code

2、必须使用的细节 一、关闭无网络无数据返回时的假死; this.customerService.addReply(this.replyData).subscribe( data => { uploading.dismiss(); if (data.result=="SUCCESS") {orm

} else {
                Toasts.showShort(this.toastCtrl, '评论失败,请重试!');
            }
        },
      **  error => {
            uploading.dismiss();
            Toasts.showShort(this.toastCtrl, '评论失败,请重试!');
        },
        ()=> {
            uploading.dismiss();
        }**

    );
相关文章
相关标签/搜索