giacomo / ngx-cookie-consent

Angular multi-language module to display a cookie consent banner without other dependencies.
https://www.npmjs.com/package/@localia/ngx-cookie-consent
MIT License
15 stars 7 forks source link

Eventemitter and Observable for functionality #17

Closed Gnyblast closed 3 months ago

Gnyblast commented 3 months ago

I realized that for google analytics to work and that kind of anything, you need to inform sometimes some 3rd party APIs about what are the selections of the end user from the cookie consent. In order to achieve that I implemented some event emitters and observable into the code that you can either lister the event or subscripbe the service observable and take action depending on what you want to do.

Gnyblast commented 3 months ago

My lintering settings are did some ; refactorings by default, you can remove them if you don't like.

Gnyblast commented 3 months ago

I found out that your cookie-manager.service exposing these functionalities on an observable which satisfies this need.