本文整理匯總了TypeScript中ngx-cookie.CookieService.remove方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript CookieService.remove方法的具體用法?TypeScript CookieService.remove怎麽用?TypeScript CookieService.remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ngx-cookie.CookieService
的用法示例。
在下文中一共展示了CookieService.remove方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: ngOnInit
ngOnInit() {
// Clean cookies
this.cookieService.remove('COACH_REGISTER_CONDITIONS_ACCEPTED');
this.cookieService.remove('COACH_REGISTER_FORM_SENT');
this.contactForm = this.formBuilder.group({
name: ['', Validators.compose([Validators.required])],
mail: ['', Validators.compose([Validators.required])],
message: ['', [Validators.required]],
});
}
示例2:
this.loginService.loginWithToken(token, false).then(() => {
this.cookieService.remove('social-authentication');
this.router.navigate(['']);
}, () => {
示例3: invalidateSession
invalidateSession (error) {
console.log(error)
this.cookieService.remove('token', { domain: document.domain })
localStorage.removeItem('token')
sessionStorage.removeItem('bid')
}
示例4: goToWelcomePage
goToWelcomePage() {
// Clean cookies
this.cookieService.remove('COACH_REGISTER_CONDITIONS_ACCEPTED');
this.cookieService.remove('COACH_REGISTER_FORM_SENT');
this.router.navigate(['/welcome']);
}
示例5: deleteAcceptedConditions
deleteAcceptedConditions() {
console.log('Coach register refuse conditions');
this.cookieService.remove('COACH_REGISTER_CONDITIONS_ACCEPTED');
}