本文整理匯總了TypeScript中ionic-angular.ModalController類的典型用法代碼示例。如果您正苦於以下問題:TypeScript ModalController類的具體用法?TypeScript ModalController怎麽用?TypeScript ModalController使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ModalController類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: showPicTutorial
showPicTutorial(){
var modalPage = this.modalCtrl.create('ModalPage'); modalPage.present();
if(this.DTMenabled===true){
if(!_satellite.data.customVars["tutorial mode"]){
_satellite.data.customVars["tutorial mode"]="Manually Opened"
}
_satellite.data.customVars["tutorial"]="Company Select: API Key"
_satellite.track("tutorial");
}
}
示例2:
this.af.auth.subscribe((auth) => {
console.log(auth, "auth")
if (auth == null) {
this.modalCtrl.create(LoginModal, {}, { enableBackdropDismiss: false }).present();
return false;
} else {
return true;
}
})
示例3: showSignInModal
showSignInModal() {
//navigate to sign in page
let signInModal = this.modalController.create(SignInPage, { Profile: this.userProfile });
signInModal.onDidDismiss(() => {
//may have an updated user profile
this.refreshProfileView();
});
signInModal.present();
}
示例4:
this.storage.get('userLoginInfo').then((userLoginInfo) => {
if (userLoginInfo != null) {
let subcription =this.modalCtrl.create('SaveSubcriptionPage',product);
subcription.onDidDismiss((response) => {
});
subcription.present();
}else{
this.navCtrl.setRoot('LoginPage');
}
});
示例5: updateScore
updateScore() {
const player = this.playerOne.hasTurn ? this.playerOne : this.playerTwo;
let modal = this.modal.create(UpdateScore, { player, run: this.possibleRun});
modal.onDidDismiss(data => {
if (data) {
this.store.dispatch(this.gameActions.submitInning({
run: this.possibleRun - data.balls,
foul: data.foul
}));
this.store.dispatch(this.gameActions.updateConsecutiveFouls({
foul: data.foul,
thirdFoul: data.thirdFoul
}));
this.store.dispatch(this.gameActions.switchPlayer());
this.store.dispatch(this.gameActions.updatePossibleRun(data.balls));
}
});
modal.present();
}
示例6: signInClicked
signInClicked (){
this.loginModal = this.modalCtrl.create(LoginModal,
{ userId: this.phone.user, allowCancel: true, addingUser: false }
);
this.loginModal.onDidDismiss(data => {
if (data.success) {
this.phone = this.phonesprovider.getIdOnSuccessfulLogin(data.user)
}
});
this.loginModal.present();
}
示例7:
return Observable.create((observer) => {
let alertModal = this.modalController.create(CustomAlertPopupPage, alerParamM, modelOtp);
// alertModal.onWillDismiss(() => {
// alerParamM.onWillDismiss && alerParamM.onWillDismiss();
// observer.next({});
// });
alertModal.onDidDismiss(() => {
alerParamM.onDidDisMiss && alerParamM.onDidDisMiss();
observer.next({});
});
alertModal.present();
});
示例8: addReview
addReview(){
let modal2 = this.modalCtrl.create(AddReviewPage);
modal2.onDidDismiss(review => {
if(review){
this.reviews.push(review);
this.reviewService.createReview(review);
}
});
modal2.present();
}
示例9: atob
showHistorico(historicoHasheado) {
var historicoString = atob(historicoHasheado.historico);
var historicoObjeto = JSON.parse(historicoString);
const meuModal = this._modal.create('HistoricoModalPage', { objeto: historicoObjeto});
meuModal.present();
// console.log(historicoHasheado.historico);
// console.log(historicoString);
}
示例10:
this.confirm().then(() => {
this.onGoingProcessProvider.clear();
let modal = this.modalCtrl.create(BackupReadyModalPage, {}, { showBackdrop: false, enableBackdropDismiss: false });
modal.present({ animate: false });
modal.onDidDismiss(() => {
if (this.fromOnboarding) {
this.navCtrl.push(DisclaimerPage);
} else {
this.navCtrl.popToRoot({ animate: false });
}
});
}).catch((err) => {