本文整理匯總了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'])
}
示例2: deleteCookie
deleteCookie(key: string, path?: string): void {
this.cookie.delete(key, path);
}
示例3: siteLogout
siteLogout() {
this.cookie.delete('token');
this.cookie.delete('user_id');
location.reload();
}