本文整理汇总了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);
}