@wecodeit/ng-cookie-consent
TypeScript icon, indicating that this package has built-in type declarations

3.1.3Β β€’Β PublicΒ β€’Β Published

@wecodeit/ng-cookie-consent πŸ‘‹

Version

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


This README was generated with ❀️ by readme-md-generator

Package Sidebar

Install

npm i @wecodeit/ng-cookie-consent

Weekly Downloads

81

Version

3.1.3

License

none

Unpacked Size

674 kB

Total Files

22

Last publish

Collaborators

  • felixjiricka