本文整理汇总了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');
}