@wecodeit/ng-cookie-consent
v3.1.3
Published
<h1>@wecodeit/ng-cookie-consent π</h1> <p> <a href="https://www.npmjs.com/package/@wecodeit/ng-cookie-consent" target="_blank"> <img alt="Version" src="https://img.shields.io/npm/v/@wecodeit/ng-cookie-consent.svg"> </a> </p>
Downloads
12
Maintainers
Readme
Easy way to get and manage users CookieConsent in Angular. It automatically checks for an existing consent cookie - if it exists, no cookie banner will be shown. Otherwise the basic banner will be displayed and the users input will be stored in firestore.
β¨ Demo
Install
npm i --save @wecodeit/ng-cookie-consent
Usage
Import the CookieConsent Module into your app.module.ts and initialize it with your firebase configuration.
import {CookieConsentModule} from '@wecodeit/ng-cookie-consent';
@NgModule({
imports: [
CookieConsentModule.forRoot(environment.firebase)
]
})
export class AppModule { }
If you want to use your own configuration, you can use the COOKIE_CONSENT_CONFIG
InjectionToken:
import {COOKIE_CONSENT_CONFIG, CookieConsentConfig} from '@wecodeit/ng-cookie-consent';
const cookieConfig: CookieConsentConfig = {
bannerConfig: {
htmlHeader: '<b>Just a test</b>'
}
}
@NgModule({
providers: [
{ provide: COOKIE_CONSENT_CONFIG, useValue: cookieConfig }
]
})
export class AppModule { }
Author
π€ WeCodeIt OG
- Website: www.wecodeit.dev
- Github: @felixjiricka
This README was generated with β€οΈ by readme-md-generator