本文整理匯總了TypeScript中ionic-angular.Nav.present方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Nav.present方法的具體用法?TypeScript Nav.present怎麽用?TypeScript Nav.present使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ionic-angular.Nav
的用法示例。
在下文中一共展示了Nav.present方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: showLoginPage
showLoginPage(done) {
let modal = Modal.create(LoginPage);
modal.onDismiss((user) => {
// 觸發回調函數
done && done(user);
});
this.nav.present(modal);
}
示例2: checkWeb
checkWeb(nav: Nav) {
if (Network.connection == 'none') {
let toast = Toast.create({
message: 'No connection.',
//duration: 10000,
});
nav.present(toast);
}
}
示例3: showSchdError
showSchdError(theError: any, nav: Nav) {
let toast = Toast.create({
message: JSON.stringify(theError),
duration: 3000,
});
nav.present(toast);
}
示例4: updateUserAlert
private updateUserAlert():void {
let alert = Alert.create({
title: 'User Information Updated',
buttons: [
{
text: 'Okay'
}
]
});
this._navController.present(alert);
}
示例5: switch
this.events.subscribe('openNotification', (data) => {
const {extras} = data[0];
let statusNames, statusName, modal;
switch (extras.code) {
case '100': // 拍賣師收到拍品審核請求
case '106': // 拍賣師收到拍品審核請求
statusNames = {'100': 'pending', '106': 'ended'};
statusName = statusNames[extras.code];
modal = Modal.create(AkProductsPage, {statusName: statusName, notifyProductId: extras.pid});
this.nav.present(modal);
break;
case '101': // 賣家收到拍品審核通過
case '102': // 賣家收到拍品審核不通過
case '103': // 賣家收到拍品被上架
statusNames = {'101': 'processing', '102': 'ended', '103': 'online'};
statusName = statusNames[extras.code];
modal = Modal.create(OwnerProductsPage, {statusName: statusName, notifyProductId: extras.pid});
this.nav.present(modal);
break;
}
});
示例6: deleteUserError
private deleteUserError(): void {
let alert = Alert.create({
title: 'Woops!',
subTitle: 'An error occurred and your account cannot be deleted at this time. Please try again later.',
buttons: [
{
text: 'OK',
handler: () => {
}
}
]
});
this._navController.present(alert);
}
示例7: userDeleted
private userDeleted(): void {
this._authService.logOut();
let alert = Alert.create({
title: 'Deleted!',
subTitle: 'Your account has been deleted. Please note that if you wish to unregister for an event you must do so through the email that which you used to register.',
buttons: [
{
text: 'OK',
handler: () => {
this._navController.setRoot(LoginPage);
}
}
]
});
this._navController.present(alert);
}
示例8: deleteUser
private deleteUser():void {
let confirm = Alert.create({
title: 'Delete your account?',
message: 'Are you sure you wish to delete your account? This will not unregister you from any registered events',
buttons: [
{
text: 'Disagree',
handler: () => {
console.log('Disagree clicked');
}
},
{
text: 'Agree',
handler: () => {
this.deletingUser = true;
this._userService.deleteUser(this.user.id);
}
}
]
});
this._navController.present(confirm);
}
示例9: saveAlert
private saveAlert(userEvent) {
let alert = Alert.create({
title: 'Saving Event',
subTitle: 'Saving this event does not mean that you are registered. Please click the information button for registration instructions.',
buttons: [
{
text: 'Save',
handler: () => {
this._userEventApi.createUserEvent(this.userId, userEvent);
this.registered = true;
}
},
{
text: 'Cancel',
handler: () => {
this.registered = false;
}
}
]
});
this.nav.present(alert);
}
示例10: confirmFriendRegistration
confirmFriendRegistration() {
let confirmFriend = Alert.create({
title: 'Registration Confirmation',
message: 'Thank you for registering! You will receive an e-mail to confirm your registration for this event.',
buttons: [
{
text: 'Confirm',
handler: () => {
// form.submit();
this.backToEvents();
}
},
{
text: 'Cancel',
role: 'cancel',
handler: () => {
console.log('cancel registration');
}
}
]
});
this.nav.present(confirmFriend);
}