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


TypeScript ToastrService.success方法代碼示例

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


在下文中一共展示了ToastrService.success方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1:

 this.apiService.updateDarkhast(rowData, this.editingRowKey).subscribe(() => {
   this.toastr.success('تعداد با موفقیت کاهش یافت');
   this.editingMode = false;
   this.listDarkhastGrid.instance.cancelEditData();
   e.cancel = true;
   this.getListDarkhast();
 }, (error) => {
開發者ID:myprojectsfile,項目名稱:taavoni,代碼行數:7,代碼來源:request-admin.component.ts

示例2:

 this.Api.login(details).subscribe(data=>{
   if(data.StatusCode==200){
    this.toaster.success('Login Successfll', 'Login Success');
    this.router.navigate(['/dashboard'])
   }
   else{
    this.toaster.error('Incorrect Username and pasword', 'Login Failed');
   }
 })
開發者ID:troplr,項目名稱:swift-wallet,代碼行數:9,代碼來源:login.component.ts

示例3:

 this.dataService.createPost(this.addPostFormGroup.value).subscribe((response) => {
   if(response.status == 201) {
     this.toastr.success('Success', 'New post created successfully',{
       timeOut: 1000,
       progressBar: true,
       progressAnimation: 'increasing'
     });
     this.router.navigate(['/index']);
   } 
 });
開發者ID:samazon,項目名稱:angular-material,代碼行數:10,代碼來源:create.component.ts

示例4: tap

      tap((res: any) => {
        if (res instanceof HttpResponse && res.body.token) {
          this.saveToken(res.body);
          this.toast.success(
            `Hello, ${JSON.parse(
              localStorage.getItem("currentUser")
            )['username']}`
          );
          this.router.navigate(["/home"]);
        }

        if (
          res instanceof HttpResponse &&
          res.body.success &&
          res.url.endsWith("/signup")
        ) {
          this.toast.success(res.body.message, "Success");
          this.router.navigate(["/signin"]);
        }
      })
開發者ID:AndonMitev,項目名稱:JS-Web,代碼行數:20,代碼來源:jwt.interceptor.ts

示例5: map

 map(success => {
   this.success = success
   if (this.success.type === 'info') {
     this.toastrService.info(this.success.message, this.success.type)
     return this.success.type;
   }
   else {
     this.toastrService.success(this.success.message, this.success.type)
     return this.success.type;
   }
 },
開發者ID:leninloganathan,項目名稱:angularspree,代碼行數:11,代碼來源:product.service.ts

示例6: setTimeout

        .subscribe((apiResponse) => {

          if (apiResponse.status == 200) {
            this.toastr.success("Signed Up", "!SuccesFull");
            setTimeout(() => {
              this.goToSignIn();
            }, 2000);//redirecting to signIn page

          }
          else {
            this.toastr.error(apiResponse.message, "Error!");
          }
        },
開發者ID:HanumantChidrawar,項目名稱:groupChatAppFrontEnd,代碼行數:13,代碼來源:signup.component.ts

示例7: tap

      tap((res: HttpEvent<any>) => {
        if (
          res instanceof HttpResponse &&
          res.body.token &&
          res.url.endsWith("login")
        ) {
          console.log("Here 1");

          this.saveToken(res.body);
          this.toastr.success("Successful login!", "Logged in!");
          this.router.navigate(["/home"]);
        }

        if (
          res instanceof HttpResponse &&
          res.body.success &&
          res.url.endsWith("signup")
        ) {
          console.log("Here 2");

          this.toastr.success(res.body.message, "Registered!");
          this.router.navigate(["/signin"]);
        }
      })
開發者ID:stwel,項目名稱:SoftUni,代碼行數:24,代碼來源:app.auth.intercetor.ts

示例8: showSavedMessage

  showSavedMessage() {
    if (this._savedSeverity === '' || this._savedMessage === '') {
      return;
    }

    if (this._savedSeverity === 'error') {
      this._toastr.error(this._savedMessage);
    } else if (this._savedSeverity === 'warning') {
      this._toastr.warning(this._savedMessage);
    } else if (this._savedSeverity === 'info') {
      this._toastr.info(this._savedMessage);
    } else if (this._savedSeverity === 'success') {
      this._toastr.success(this._savedMessage);
    }

    this._savedSeverity = '';
    this._savedMessage = '';
  }
開發者ID:epot,項目名稱:Gifter,代碼行數:18,代碼來源:error-handle.service.ts

示例9: setTimeout

        .subscribe((apiResponse) => {

          if (apiResponse.status == 200) {
            this.toastr.success("Signed In", "Success");
            console.log(apiResponse);

            Cookie.set('authToken', apiResponse.data.authToken);
            Cookie.set('receiverId', apiResponse.data.userDetails.userId);
            Cookie.set('receiverName', `${apiResponse.data.userDetails.firstName} ${apiResponse.data.userDetails.lastName}`);
            this.appService.setUserInfoInLocalStorage(apiResponse.data.userDetails);

            setTimeout(() => {
              this.router.navigate(['/chat']);
            }, 2000);
          }
          else {
            this.toastr.error(apiResponse.message);
          }
        },
開發者ID:HanumantChidrawar,項目名稱:groupChatAppFrontEnd,代碼行數:19,代碼來源:login.component.ts

示例10: tap

 }), tap(_ => { this.toastrService.success('Address added successfully!', 'Success!') },
開發者ID:TrietPham96,項目名稱:angularspree,代碼行數:1,代碼來源:address.service.ts


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