-
Notifications
You must be signed in to change notification settings - Fork 61
Added cookie consent #316
base: master
Are you sure you want to change the base?
Added cookie consent #316
Changes from 6 commits
ff16270
90375cb
9bc2bbf
6e662a2
8642c64
d04af39
68a69b1
4ae03be
1700876
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations'; | |
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; | ||
import { HttpClientModule } from '@angular/common/http'; | ||
import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg'; | ||
import { NgcCookieConsentModule, NgcCookieConsentConfig } from 'ngx-cookieconsent'; | ||
|
||
// Import services | ||
import { WindowService } from './services/window.service'; | ||
|
@@ -24,6 +25,23 @@ import { TermsAndConditionsModalComponent } from './components/challenge/challen | |
// import module | ||
import { SharedModule } from './shared/shared.module'; | ||
|
||
// configuration of cookie consent | ||
const cookieConfig: NgcCookieConsentConfig = { | ||
cookie: { | ||
domain: 'localhost' // or 'your.domain.com' // it is mandatory to set a domain, for cookies to work properly (see https://goo.gl/S2Hy2A) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What will be the domain when it is in production or staging environment? At that time how will we configure it? Can it pick the domain without setting it - can you explore about it ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Shekharrajak we just need to change the domain in here for the production mode and in it's doc, i couldn't find any feature of automatic domain detection.So will have to change it manually at the time of production. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Try to make it environment variable then. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for suggestion @Shekharrajak . I have made the suggested changes. Can you please now check if this looks good to you? |
||
}, | ||
palette: { | ||
popup: { | ||
background: '#000' | ||
}, | ||
button: { | ||
background: '#f1d600' | ||
} | ||
}, | ||
theme: 'edgeless', | ||
type: 'opt-out' | ||
}; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent, | ||
|
@@ -40,6 +58,7 @@ import { SharedModule } from './shared/shared.module'; | |
HttpClientModule, | ||
FroalaEditorModule.forRoot(), | ||
FroalaViewModule.forRoot(), | ||
NgcCookieConsentModule.forRoot(cookieConfig) | ||
], | ||
providers: [ | ||
WindowService, | ||
|
Uh oh!
There was an error while loading. Please reload this page.