Added Terms and Privacy components with routing

Introduced `TermsComponent` and `PrivacyComponent` with basic templates, styles, and unit tests. Updated routing in `app.module` to include `/terms` and `/privacy` paths and registered these components.
This commit is contained in:
Peter 2025-04-06 10:25:48 +02:00
parent 4e77f50d70
commit b029153657
10 changed files with 78 additions and 2 deletions

View File

@ -11,11 +11,15 @@ import {MapComponent} from './map/map.component';
import {RulesComponent} from './rules/rules.component'; import {RulesComponent} from './rules/rules.component';
import {CopyIpComponent} from './copy-ip/copy-ip.component'; import {CopyIpComponent} from './copy-ip/copy-ip.component';
import {FooterComponent} from './footer/footer.component'; import {FooterComponent} from './footer/footer.component';
import {TermsComponent} from './terms/terms.component';
import {PrivacyComponent} from './privacy/privacy.component';
const routes: Routes = [ const routes: Routes = [
{path: '', component: HomeComponent}, {path: '', component: HomeComponent},
{path: 'map', component: MapComponent}, {path: 'map', component: MapComponent},
{path: 'rules', component: RulesComponent}, {path: 'rules', component: RulesComponent},
{path: 'terms', component: TermsComponent},
{path: 'privacy', component: PrivacyComponent},
]; ];
@NgModule({ @NgModule({
@ -26,7 +30,9 @@ const routes: Routes = [
HomeComponent, HomeComponent,
ThemeComponent, ThemeComponent,
MapComponent, MapComponent,
RulesComponent RulesComponent,
TermsComponent,
PrivacyComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,

View File

@ -0,0 +1 @@
<p>privacy works!</p>

View File

@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PrivacyComponent } from './privacy.component';
describe('PrivacyComponent', () => {
let component: PrivacyComponent;
let fixture: ComponentFixture<PrivacyComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [PrivacyComponent]
})
.compileComponents();
fixture = TestBed.createComponent(PrivacyComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,11 @@
import {Component} from '@angular/core';
@Component({
selector: 'app-privacy',
standalone: false,
templateUrl: './privacy.component.html',
styleUrl: './privacy.component.scss'
})
export class PrivacyComponent {
}

View File

@ -7,5 +7,5 @@ import {Component} from '@angular/core';
styleUrl: './rules.component.scss' styleUrl: './rules.component.scss'
}) })
export class RulesComponent { export class RulesComponent {
scrollService: any;
} }

View File

@ -0,0 +1 @@
<p>terms works!</p>

View File

@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TermsComponent } from './terms.component';
describe('TermsComponent', () => {
let component: TermsComponent;
let fixture: ComponentFixture<TermsComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [TermsComponent]
})
.compileComponents();
fixture = TestBed.createComponent(TermsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,11 @@
import {Component} from '@angular/core';
@Component({
selector: 'app-terms',
standalone: false,
templateUrl: './terms.component.html',
styleUrl: './terms.component.scss'
})
export class TermsComponent {
}