Hello, i d really appreciate if someone helps me with this,i need to access my HomePage view.dismiss() and my LoginPage view.dismiss,so that i can load a new page.
I need to access my view.dismiss from my loginpage and from my homepage at the same time and in the same function in the loginpage.ts, could someone please help me?
THanks in advance
Here is my homepage.ts:
import { Component } from ‘@angular/core’;
import {Events, NavController} from ‘ionic-angular’;
import { ModalController,ViewController} from ‘ionic-angular’;
@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {
constructor(public navCtrl: NavController,public events:Events, private modal: ModalController, private view: ViewController) {
}
openloginmodal() {
const mymodal = this.modal.create(‘LoginpagePage’);
mymodal.present();
};
loadmainpage(){
this.view.dismiss();
};
openregistermodal() {
const mymodal = this.modal.create(‘RegisterPage’);
mymodal.present();
};
}
And here is my loginpage.ts
@IonicPage()
@Component({
selector: ‘page-loginpage’,
templateUrl: ‘loginpage.html’,
})
export class LoginpagePage {
constructor(public navCtrl: NavController,public events:Events ,public navParams: NavParams,private view:ViewController, private viewctrl :ViewController) {
}
ionViewDidLoad() {
console.log(‘ionViewDidLoad LoginpagePage’);
};
Login_redirect(){
this.view.dismiss();
{ here i need the homePage view dismiss }
};
closemodal(){
this.view.dismiss();
};
}