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 {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 {AppRoutingModule} from './app-routing.module';
|
||||||
import {LandingComponent} from './component/landing/landing.component';
|
import {LandingComponent} from './component/landing/landing.component';
|
||||||
@ -33,6 +33,8 @@ import {MatDialogModule} from '@angular/material/dialog';
|
|||||||
import {InterceptorService} from './services/interceptor.service';
|
import {InterceptorService} from './services/interceptor.service';
|
||||||
import {MatCardModule} from '@angular/material/card';
|
import {MatCardModule} from '@angular/material/card';
|
||||||
|
|
||||||
|
import './custom-elements/waecm-g4-y21-cookiebanner';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [LandingComponent, LoginComponent, NavigationComponent,
|
declarations: [LandingComponent, LoginComponent, NavigationComponent,
|
||||||
TweetsComponent, EinstellungenComponent, EditierenComponent, DialogComponent],
|
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 {
|
export class AppModule {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
<div class="router-wrapper">
|
<div class="router-wrapper">
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
</div>
|
</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']
|
styleUrls: ['./landing.component.css']
|
||||||
})
|
})
|
||||||
export class LandingComponent {
|
export class LandingComponent {
|
||||||
|
showCookieBanner = true;
|
||||||
constructor() {
|
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