本文整理汇总了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 => {
开发者ID:Promact,项目名称:promact-oauth-server,代码行数:10,代码来源:change-password.component.ts
示例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;
}
});
开发者ID:Promact,项目名称:promact-oauth-server,代码行数:12,代码来源:user-list.component.ts
示例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;
}
}
开发者ID:Promact,项目名称:promact-oauth-server,代码行数:9,代码来源:authentication.service.ts
示例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.');
}
}
开发者ID:Promact,项目名称:promact-oauth-server,代码行数:23,代码来源:user-add.component.ts
示例5:
}, err => {
if (err.status === 400) {
this.toast.show('Email is invalid.');
} this.loader.loader = false;
});
开发者ID:Promact,项目名称:promact-oauth-server,代码行数:5,代码来源:user-add.component.ts
示例6:
this.groupService.addGroup(groupModel).then((result) => {
this.toast.show("Group added successfully.");
this.backToGroupList();
this.loader.loader = false;
}, err => {
开发者ID:Promact,项目名称:slack-erp-custom-integration-mvc,代码行数:5,代码来源:groupAdd.component.ts
示例7:
}, err => {
this.toast.show('Group must not be updated.');
this.loader.loader = false;
});
开发者ID:Promact,项目名称:slack-erp-custom-integration-mvc,代码行数:4,代码来源:groupEdit.component.ts
示例8:
this.userService.reSendMail(user.Id).then((response) => {
this.toast.show('Credentials re-send succesfully');
this.loader.loader = false;
}, err => {
开发者ID:Promact,项目名称:promact-oauth-server,代码行数:4,代码来源:user-list.component.ts
注:本文中的md2.Md2Toast类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论