Merge Angular 16 Irish Monitor to develop #33
|
@ -66,7 +66,7 @@ export type CookieLawTarget = '_blank' | '_self';
|
||||||
})
|
})
|
||||||
export class CookieLawComponent implements OnInit {
|
export class CookieLawComponent implements OnInit {
|
||||||
public cookieLawSeen: boolean;
|
public cookieLawSeen: boolean;
|
||||||
|
@Input() cookieName = "cookieLawSeen";
|
||||||
@Input('learnMore')
|
@Input('learnMore')
|
||||||
get learnMore() { return this._learnMore; }
|
get learnMore() { return this._learnMore; }
|
||||||
set learnMore(value: string) {
|
set learnMore(value: string) {
|
||||||
|
@ -109,7 +109,7 @@ export class CookieLawComponent implements OnInit {
|
||||||
this.isSeenEvt = new EventEmitter<boolean>();
|
this.isSeenEvt = new EventEmitter<boolean>();
|
||||||
this.animation = 'topIn';
|
this.animation = 'topIn';
|
||||||
this._position = 'bottom';
|
this._position = 'bottom';
|
||||||
this.cookieLawSeen = this._service.seen();
|
this.cookieLawSeen = this._service.seen(this.cookieName);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
@ -142,7 +142,7 @@ export class CookieLawComponent implements OnInit {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
this._service.storeCookie();
|
this._service.storeCookie(this.cookieName);
|
||||||
this.animation = this.position === 'top' ? 'topOut' : 'bottomOut';
|
this.animation = this.position === 'top' ? 'topOut' : 'bottomOut';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,12 +12,12 @@ import { Injectable } from '@angular/core';
|
||||||
export class CookieLawService {
|
export class CookieLawService {
|
||||||
|
|
||||||
|
|
||||||
seen(): boolean {
|
seen(cookieName): boolean {
|
||||||
return this.cookieExists('cookieLawSeen');
|
return this.cookieExists(cookieName);
|
||||||
}
|
}
|
||||||
|
|
||||||
storeCookie(): void {
|
storeCookie(cookieName): void {
|
||||||
return this.setCookie('cookieLawSeen');
|
return this.setCookie('cookieName');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue