Added multiple pages

This commit is contained in:
Erik Tiekstra
2021-03-23 10:03:13 +01:00
committed by Erik Tiekstra
parent ec6c7eb4a9
commit 226f291bd3
30 changed files with 286 additions and 8 deletions

View File

@@ -4,9 +4,34 @@ import { ExtraOptions, RouterModule, Routes } from '@angular/router';
const routes: Routes = [
{
path: '',
data: { title: 'FA Mina sidor' },
data: { title: '' },
loadChildren: () => import('./pages/start/start.module').then(m => m.StartModule),
},
{
path: 'mina-deltagare',
data: { title: 'Mina deltagare' },
loadChildren: () => import('./pages/participants/participants.module').then(m => m.ParticipantsModule),
},
{
path: 'avrop',
data: { title: 'Avrop' },
loadChildren: () => import('./pages/call-off/call-off.module').then(m => m.CallOffModule),
},
{
path: 'meddelanden',
data: { title: 'Meddelanden' },
loadChildren: () => import('./pages/messages/messages.module').then(m => m.MessagesModule),
},
{
path: 'statistik',
data: { title: 'Statistik' },
loadChildren: () => import('./pages/statistics/statistics.module').then(m => m.StatisticsModule),
},
{
path: 'installningar',
data: { title: 'Inställningar' },
loadChildren: () => import('./pages/settings/settings.module').then(m => m.SettingsModule),
},
{
path: '**',
data: { title: 'Sidan hittas inte' },

View File

@@ -8,7 +8,9 @@
<main id="dafa-main-content" class="dafa__main">
<dafa-sidebar class="dafa__sidebar"></dafa-sidebar>
<div class="dafa__content">
<router-outlet></router-outlet>
<digi-ng-typography-base>
<router-outlet></router-outlet>
</digi-ng-typography-base>
</div>
</main>
</div>

View File

@@ -1,3 +1,4 @@
import { DigiNgTypographyBaseModule } from '@af/digi-ng/_typography/typography-base';
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
@@ -9,7 +10,15 @@ import { SkipToContentModule } from './components/skip-to-content/skip-to-conten
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, HttpClientModule, AppRoutingModule, SkipToContentModule, NavigationModule, SidebarModule],
imports: [
BrowserModule,
HttpClientModule,
AppRoutingModule,
SkipToContentModule,
NavigationModule,
SidebarModule,
DigiNgTypographyBaseModule,
],
providers: [],
bootstrap: [AppComponent],
})

View File

@@ -0,0 +1 @@
<section class="call-off">Avrop funkar!</section>

View File

@@ -0,0 +1,29 @@
import { DigiNgTypographyBaseModule } from '@af/digi-ng/_typography/typography-base';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { HorizontalCenterModule } from '@dafa-shared/components/horizontal-center/horizontal-center.module';
import { CallOffComponent } from './call-off.component';
describe('CallOffComponent', () => {
let component: CallOffComponent;
let fixture: ComponentFixture<CallOffComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CallOffComponent],
imports: [RouterTestingModule, DigiNgTypographyBaseModule, HorizontalCenterModule],
}).compileComponents();
})
);
beforeEach(() => {
fixture = TestBed.createComponent(CallOffComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,9 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'dafa-call-off',
templateUrl: './call-off.component.html',
styleUrls: ['./call-off.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CallOffComponent {}

View File

@@ -0,0 +1,10 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CallOffComponent } from './call-off.component';
@NgModule({
declarations: [CallOffComponent],
imports: [CommonModule, RouterModule.forChild([{ path: '', component: CallOffComponent }])],
})
export class CallOffModule {}

View File

@@ -0,0 +1 @@
<section class="messages">Meddelanden funkar!</section>

View File

@@ -0,0 +1,29 @@
import { DigiNgTypographyBaseModule } from '@af/digi-ng/_typography/typography-base';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { HorizontalCenterModule } from '@dafa-shared/components/horizontal-center/horizontal-center.module';
import { MessagesComponent } from './messages.component';
describe('MessagesComponent', () => {
let component: MessagesComponent;
let fixture: ComponentFixture<MessagesComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MessagesComponent],
imports: [RouterTestingModule, DigiNgTypographyBaseModule, HorizontalCenterModule],
}).compileComponents();
})
);
beforeEach(() => {
fixture = TestBed.createComponent(MessagesComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,9 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'dafa-messages',
templateUrl: './messages.component.html',
styleUrls: ['./messages.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MessagesComponent {}

View File

@@ -0,0 +1,10 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { MessagesComponent } from './messages.component';
@NgModule({
declarations: [MessagesComponent],
imports: [CommonModule, RouterModule.forChild([{ path: '', component: MessagesComponent }])],
})
export class MessagesModule {}

View File

@@ -0,0 +1 @@
<section class="participants">Mina deltagare funkar!</section>

View File

@@ -0,0 +1,29 @@
import { DigiNgTypographyBaseModule } from '@af/digi-ng/_typography/typography-base';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { HorizontalCenterModule } from '@dafa-shared/components/horizontal-center/horizontal-center.module';
import { ParticipantsComponent } from './participants.component';
describe('ParticipantsComponent', () => {
let component: ParticipantsComponent;
let fixture: ComponentFixture<ParticipantsComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ParticipantsComponent],
imports: [RouterTestingModule, DigiNgTypographyBaseModule, HorizontalCenterModule],
}).compileComponents();
})
);
beforeEach(() => {
fixture = TestBed.createComponent(ParticipantsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,9 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'dafa-participants',
templateUrl: './participants.component.html',
styleUrls: ['./participants.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ParticipantsComponent {}

View File

@@ -0,0 +1,10 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { ParticipantsComponent } from './participants.component';
@NgModule({
declarations: [ParticipantsComponent],
imports: [CommonModule, RouterModule.forChild([{ path: '', component: ParticipantsComponent }])],
})
export class ParticipantsModule {}

View File

@@ -0,0 +1 @@
<section class="settings">Inställningar funkar!</section>

View File

@@ -0,0 +1,29 @@
import { DigiNgTypographyBaseModule } from '@af/digi-ng/_typography/typography-base';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { HorizontalCenterModule } from '@dafa-shared/components/horizontal-center/horizontal-center.module';
import { SettingsComponent } from './settings.component';
describe('SettingsComponent', () => {
let component: SettingsComponent;
let fixture: ComponentFixture<SettingsComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [SettingsComponent],
imports: [RouterTestingModule, DigiNgTypographyBaseModule, HorizontalCenterModule],
}).compileComponents();
})
);
beforeEach(() => {
fixture = TestBed.createComponent(SettingsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,9 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'dafa-settings',
templateUrl: './settings.component.html',
styleUrls: ['./settings.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class SettingsComponent {}

View File

@@ -0,0 +1,10 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { SettingsComponent } from './settings.component';
@NgModule({
declarations: [SettingsComponent],
imports: [CommonModule, RouterModule.forChild([{ path: '', component: SettingsComponent }])],
})
export class SettingsModule {}

View File

@@ -1,3 +1 @@
<digi-ng-typography-base>
<section class="start">Start funkar!</section>
</digi-ng-typography-base>
<section class="start">Start funkar!</section>

View File

@@ -1,4 +1,3 @@
import { DigiNgTypographyBaseModule } from '@af/digi-ng/_typography/typography-base';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
@@ -6,6 +5,6 @@ import { StartComponent } from './start.component';
@NgModule({
declarations: [StartComponent],
imports: [CommonModule, RouterModule.forChild([{ path: '', component: StartComponent }]), DigiNgTypographyBaseModule],
imports: [CommonModule, RouterModule.forChild([{ path: '', component: StartComponent }])],
})
export class StartModule {}

View File

@@ -0,0 +1 @@
<section class="statistics">Statistik funkar!</section>

View File

@@ -0,0 +1,29 @@
import { DigiNgTypographyBaseModule } from '@af/digi-ng/_typography/typography-base';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { HorizontalCenterModule } from '@dafa-shared/components/horizontal-center/horizontal-center.module';
import { StatisticsComponent } from './statistics.component';
describe('StatisticsComponent', () => {
let component: StatisticsComponent;
let fixture: ComponentFixture<StatisticsComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [StatisticsComponent],
imports: [RouterTestingModule, DigiNgTypographyBaseModule, HorizontalCenterModule],
}).compileComponents();
})
);
beforeEach(() => {
fixture = TestBed.createComponent(StatisticsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,9 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
@Component({
selector: 'dafa-statistics',
templateUrl: './statistics.component.html',
styleUrls: ['./statistics.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class StatisticsComponent {}

View File

@@ -0,0 +1,10 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { StatisticsComponent } from './statistics.component';
@NgModule({
declarations: [StatisticsComponent],
imports: [CommonModule, RouterModule.forChild([{ path: '', component: StatisticsComponent }])],
})
export class StatisticsModule {}