我是离子2的新手,我们想在方法中调用构造函数,如何调用
export class OtpPage {
constructor(public navCtrl: NavController, public navParams: NavParams,
public formBuilder:FormBuilder, public logger: Logger,
public rest: Rest) {
this.customer_id=this.navParams.get('customer_id');
this.mobile=this.navParams.get('mobile');
this.myForm = formBuilder.group({
'otpNumber': ['', Validators.required]
});
submit() {
if(result.status=='1'){
this.firstDiv=false;
this.secondDiv = true;
this.logger.debug("checking access tocken "+
this.access_token);
alert("otp success");
}
}
在这些if循环中如何在this.secondDiv
= true