Added first implementation of custom cookie banner
This commit is contained in:
parent
c3fbb09815
commit
2a6d390466
22715
frontend/package-lock.json
generated
22715
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CUSTOM_ELEMENTS_SCHEMA, NgModule} from '@angular/core';
|
||||
|
||||
import {AppRoutingModule} from './app-routing.module';
|
||||
import {LandingComponent} from './component/landing/landing.component';
|
||||
@ -33,6 +33,8 @@ import {MatDialogModule} from '@angular/material/dialog';
|
||||
import {InterceptorService} from './services/interceptor.service';
|
||||
import {MatCardModule} from '@angular/material/card';
|
||||
|
||||
import './custom-elements/waecm-g4-y21-cookiebanner';
|
||||
|
||||
@NgModule({
|
||||
declarations: [LandingComponent, LoginComponent, NavigationComponent,
|
||||
TweetsComponent, EinstellungenComponent, EditierenComponent, DialogComponent],
|
||||
@ -69,7 +71,8 @@ import {MatCardModule} from '@angular/material/card';
|
||||
},
|
||||
|
||||
],
|
||||
bootstrap: [LandingComponent]
|
||||
bootstrap: [LandingComponent],
|
||||
schemas: [ CUSTOM_ELEMENTS_SCHEMA ],
|
||||
})
|
||||
export class AppModule {
|
||||
}
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
<div class="router-wrapper">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
<button *ngIf="!showCookieBanner" (click)="this.showCookieBanner = true"> Show cookie banner</button>
|
||||
|
||||
<waecm-g4-y21-cookiebanner *ngIf="showCookieBanner" (on-accept)="hint($event)" [applicationName]="'WAECMG4Y21'" [link]="'https://www.rocketbeans.tv/'"></waecm-g4-y21-cookiebanner>
|
||||
|
||||
@ -6,6 +6,12 @@ import {Component} from '@angular/core';
|
||||
styleUrls: ['./landing.component.css']
|
||||
})
|
||||
export class LandingComponent {
|
||||
showCookieBanner = true;
|
||||
constructor() {
|
||||
}
|
||||
hint(event): void {
|
||||
console.log('Cookie-Banner accepted');
|
||||
console.log(event);
|
||||
this.showCookieBanner = false;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user