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:
parent
4e77f50d70
commit
b029153657
|
|
@ -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,
|
||||||
|
|
|
||||||
1
frontend/src/app/privacy/privacy.component.html
Normal file
1
frontend/src/app/privacy/privacy.component.html
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<p>privacy works!</p>
|
||||||
0
frontend/src/app/privacy/privacy.component.scss
Normal file
0
frontend/src/app/privacy/privacy.component.scss
Normal file
23
frontend/src/app/privacy/privacy.component.spec.ts
Normal file
23
frontend/src/app/privacy/privacy.component.spec.ts
Normal 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();
|
||||||
|
});
|
||||||
|
});
|
||||||
11
frontend/src/app/privacy/privacy.component.ts
Normal file
11
frontend/src/app/privacy/privacy.component.ts
Normal 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 {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
frontend/src/app/terms/terms.component.html
Normal file
1
frontend/src/app/terms/terms.component.html
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
<p>terms works!</p>
|
||||||
0
frontend/src/app/terms/terms.component.scss
Normal file
0
frontend/src/app/terms/terms.component.scss
Normal file
23
frontend/src/app/terms/terms.component.spec.ts
Normal file
23
frontend/src/app/terms/terms.component.spec.ts
Normal 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();
|
||||||
|
});
|
||||||
|
});
|
||||||
11
frontend/src/app/terms/terms.component.ts
Normal file
11
frontend/src/app/terms/terms.component.ts
Normal 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 {
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user