本文整理匯總了TypeScript中md2.Md2Toast類的典型用法代碼示例。如果您正苦於以下問題:TypeScript Md2Toast類的具體用法?TypeScript Md2Toast怎麽用?TypeScript Md2Toast使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Md2Toast類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
this.userService.changePassword(passwordModel).then((result) => {
if (result.errorMessage === null) {
this.toast.show('Password changed successfully');
this.redirectionRoute.navigate(['']);
}
else {
this.toast.show(result.errorMessage);
}
this.loader.loader = false;
}, err => {
示例2: project
this.userService.userDelete(userId).then((result) => {
if (result === "") {
this.toast.show('user succesfully deleted');
this.getUsers();
this.loader.loader = false;
}
else {
this.toast.show('Remove the user from these project(s) ' + result +' and proceed to delete');
this.loader.loader = false;
}
});
示例3: canActivate
canActivate(): boolean {
if (this.userRole.Role === this.stringconstant.admin) {
return true;
}
else {
this.toast.show("You are not authorized to view this page");
return false;
}
}
示例4: addUser
addUser(userModel) {
this.loader.loader = true;
userModel.JoiningDate = new Date(userModel.JoiningDate);
let datePipeMinDate = new DatePipe("medium");
userModel.JoinDate = datePipeMinDate.transform(userModel.JoiningDate, "dd/MM/yyyy");
if (!this.isEmailExist) {
userModel.FirstName = userModel.FirstName.trim();
this.userService.registerUser(userModel).then((result) => {
this.toast.show('User added successfully.');
this.redirectionRoute.navigate(['user/list']);
this.loader.loader = false;
}, err => {
if (err.status === 400) {
this.toast.show('Email is invalid.');
} this.loader.loader = false;
});
}
else {
this.loader.loader = false;
this.toast.show('Email already exists.');
}
}
示例5:
}, err => {
if (err.status === 400) {
this.toast.show('Email is invalid.');
} this.loader.loader = false;
});
示例6:
this.groupService.addGroup(groupModel).then((result) => {
this.toast.show("Group added successfully.");
this.backToGroupList();
this.loader.loader = false;
}, err => {
示例7:
}, err => {
this.toast.show('Group must not be updated.');
this.loader.loader = false;
});
示例8:
this.userService.reSendMail(user.Id).then((response) => {
this.toast.show('Credentials re-send succesfully');
this.loader.loader = false;
}, err => {