當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Md2Toast.show方法代碼示例

本文整理匯總了TypeScript中md2.Md2Toast.show方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Md2Toast.show方法的具體用法?TypeScript Md2Toast.show怎麽用?TypeScript Md2Toast.show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在md2.Md2Toast的用法示例。


在下文中一共展示了Md2Toast.show方法的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 === 404) {//Not Found 
         this.toast.show('User Name already exists.');
     }
     this.loader.loader = false;
 });
開發者ID:Promact,項目名稱:promact-oauth-server,代碼行數:6,代碼來源:user-edit.component.ts

示例6:

 }, 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

示例7:

 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

示例8:

 }, err => {
     this.toast.show('Group must not be updated.');
     this.loader.loader = false;
 });
開發者ID:Promact,項目名稱:slack-erp-custom-integration-mvc,代碼行數:4,代碼來源:groupEdit.component.ts


注:本文中的md2.Md2Toast.show方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。