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


TypeScript CookieService.delete方法代碼示例

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


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

示例1: ngOnInit

 ngOnInit(){
     let pciParams = this.cookieService.get('payBillJson');
     this.cookieService.delete('payBillJson');
     let decodedString = decodeURI(pciParams).replace(new RegExp("%3A", 'g'),":").replace(new RegExp("%2C", 'g'),",")
     let paymentInfo = JSON.parse(decodedString);
     paymentInfo.nickName = this.replaceAll(paymentInfo.nickName,"+"," ");
     let paymentDate = this.replaceAll(paymentInfo.paymentDate,"%2F","/");
     this.store.dispatch(new billingTypes.UpdateCollectivePaymentInfo({paymentAmount:paymentInfo.paymentAmount,paymentDate}))
     this.store.dispatch(new billingTypes.SaveBankInfo(this.billingService.getBankInfoForStore(paymentInfo)))
     this.router.navigate(['/protected/customer/billing/paybill/collective/verify.htm'])
 }
開發者ID:bbachi,項目名稱:Angular5Sample,代碼行數:11,代碼來源:pcitogme.component.ts

示例2: deleteCookie

 deleteCookie(key: string, path?: string): void {
     this.cookie.delete(key, path);
 }
開發者ID:staneee,項目名稱:ABPTemplateUI-ng-alain,代碼行數:3,代碼來源:utils.service.ts

示例3: siteLogout

 siteLogout() {
   this.cookie.delete('token');
   this.cookie.delete('user_id');
   location.reload();
 }
開發者ID:caberrio,項目名稱:movies,代碼行數:5,代碼來源:auth.service.ts


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