Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It's not possible to close completely the Cookie Policy once answered #15

Closed
yduartep opened this issue Jun 12, 2018 · 2 comments
Closed

Comments

@yduartep
Copy link

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Versions

Angular CLI: 6.0.0
Node: 10.0.0
OS: darwin x64
Angular: 6.0.0

Repro steps

The log given by the failure

Desired functionality

In this moment once you answer the consent, the popup closes but an small tab with the title "Cookie Policy" is left. I need to close everything once is answered but there isn't a close method.

Mention any other details that might be useful

@tinesoft
Copy link
Owner

Hi @yduartep

Sorry for the late answer, 'been a bit busy lately...

To achieve what you want, you can call CookieConsentService.toggleRevokeButton(false)
in the callback to "close event" as such:

this.popupCloseSubscription = this.ccService.popupClose$.subscribe( () => {

       this.ccService.toggleRevokeButton(false);
      });

Later, after i will add the missing CookieConsentService.close(showRevoke:boolean) method,
which does some additional checks + animations, before hiding the "Cookie Policy" element.

Then you can just replace toggleRevokeButton(show:boolean) with that method instead.

@code-ishwar
Copy link

use destroy in if block or something to check if consent is acquired or whatever your case is. I used this method to hide it in browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants