[angular-16-irish-monitor | DONE | FIXED] cookie: set properly cookie when cookie name is not default

This commit is contained in:
argirok 2023-12-15 11:26:28 +02:00
parent 5060151e09
commit c977bb0898
2 changed files with 3 additions and 2 deletions

View File

@ -109,10 +109,11 @@ export class CookieLawComponent implements OnInit {
this.isSeenEvt = new EventEmitter<boolean>();
this.animation = 'topIn';
this._position = 'bottom';
this.cookieLawSeen = this._service.seen(this.cookieName);
}
ngOnInit(): void {
this.cookieLawSeen = this._service.seen(this.cookieName);
if (typeof document !== 'undefined') {
this.animation = this.position === 'bottom' ? 'bottomIn' : 'topIn';

View File

@ -17,7 +17,7 @@ export class CookieLawService {
}
storeCookie(cookieName): void {
return this.setCookie('cookieName');
return this.setCookie(cookieName);
}
/**