0

我正在使用 ngx cookie 同意来询问用户是否同意 cookie 的存储和使用。

链接:https ://github.com/tinesoft/ngx-cookieconsent

所以我尝试了这个完美的模块,但没有 cookie 个性化弹出的选项。

我想要三个按钮:拒绝、接受和个性化 我已经开发了下面的按钮,它显示了按钮,但是我可以在哪里实现 DeclineCookies()、CustomizeCookies 和 AcceptCookies()?

const cookieConfig: NgcCookieConsentConfig = {
cookie: {
domain: 'localhost'
},
palette: {
popup: {
background: '#000',

},
button: {
  background: '#f1d600'
}
},
theme: 'edgeless',
type: 'opt-out',
layout: 'my-custom-layout',
layouts: {
"my-custom-layout": '{{buttons}}'
},
elements:{
buttons: <span id="cookieconsent:desc" class="cc-message">{{message}} <button (click)="delclineCookies()">Decline</button> <button (click)="customomizeCookies()">Customize Cookies</button> <button (click)="acceptCookies()">Accept</button> </span>,
},
content:{
message: 'By using our site, you acknowledge that you have read and understood our Policy',
}

};
4

0 回答 0