Loading src/app/app-routing.module.ts +22 −2 Original line number Diff line number Diff line import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import {OverviewComponent} from './overview/overview.component'; import {SelectGameComponent} from './select-game/select-game.component'; import {ErrorComponent} from './error/error.component'; const routes: Routes = []; const routes: Routes = [ { path: 'overview', component: OverviewComponent, }, { path: '', component: SelectGameComponent, }, { path: '**', component: ErrorComponent, } ]; @NgModule({ imports: [RouterModule.forRoot(routes)], imports: [RouterModule.forRoot(routes, { useHash: true, enableTracing: false, relativeLinkResolution: 'legacy' })], exports: [RouterModule] }) export class AppRoutingModule { } src/app/app.component.html +2 −2 Original line number Diff line number Diff line <div fxLayout="column" fxFlexFill style="background-color: #e7e7e7"> <div fxLayout="column" fxFlexFill style="background-image: url(/assets/background.jpg)"> <app-header> </app-header> <div fxFlex> <app-select-game></app-select-game> <router-outlet></router-outlet> </div> <app-footer> <mat-toolbar color="primary"> Loading src/app/app.module.ts +7 −1 Original line number Diff line number Diff line Loading @@ -13,6 +13,9 @@ import {MatButtonModule} from '@angular/material/button'; import {MatFormFieldModule} from '@angular/material/form-field'; import {MatInputModule} from '@angular/material/input'; import {MatCardModule} from '@angular/material/card'; import { OverviewComponent } from './overview/overview.component'; import { ErrorComponent } from './error/error.component'; import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; @NgModule({ declarations: [ Loading @@ -20,6 +23,8 @@ import {MatCardModule} from '@angular/material/card'; HeaderComponent, FooterComponent, SelectGameComponent, OverviewComponent, ErrorComponent, ], imports: [ BrowserModule, Loading @@ -30,7 +35,8 @@ import {MatCardModule} from '@angular/material/card'; MatButtonModule, MatFormFieldModule, MatInputModule, MatCardModule MatCardModule, MatProgressSpinnerModule, ], providers: [], bootstrap: [AppComponent] Loading src/app/error/error.component.html 0 → 100644 +10 −0 Original line number Diff line number Diff line <div style="text-align: center; margin-left: 15em; margin-right: 15em; margin-top: 5em;"> <h3> Leider konnte die Seite nicht erreicht werden, bitte überprüfen Sie den Link oder kehren Sie auf die <a href="router.navigate(['/overview'])">Startseite</a> zurück </h3> <br> <mat-progress-spinner color="primary" mode="mode" value="value"> </mat-progress-spinner> </div> src/app/error/error.component.scss 0 → 100644 +0 −0 Empty file added. Loading
src/app/app-routing.module.ts +22 −2 Original line number Diff line number Diff line import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import {OverviewComponent} from './overview/overview.component'; import {SelectGameComponent} from './select-game/select-game.component'; import {ErrorComponent} from './error/error.component'; const routes: Routes = []; const routes: Routes = [ { path: 'overview', component: OverviewComponent, }, { path: '', component: SelectGameComponent, }, { path: '**', component: ErrorComponent, } ]; @NgModule({ imports: [RouterModule.forRoot(routes)], imports: [RouterModule.forRoot(routes, { useHash: true, enableTracing: false, relativeLinkResolution: 'legacy' })], exports: [RouterModule] }) export class AppRoutingModule { }
src/app/app.component.html +2 −2 Original line number Diff line number Diff line <div fxLayout="column" fxFlexFill style="background-color: #e7e7e7"> <div fxLayout="column" fxFlexFill style="background-image: url(/assets/background.jpg)"> <app-header> </app-header> <div fxFlex> <app-select-game></app-select-game> <router-outlet></router-outlet> </div> <app-footer> <mat-toolbar color="primary"> Loading
src/app/app.module.ts +7 −1 Original line number Diff line number Diff line Loading @@ -13,6 +13,9 @@ import {MatButtonModule} from '@angular/material/button'; import {MatFormFieldModule} from '@angular/material/form-field'; import {MatInputModule} from '@angular/material/input'; import {MatCardModule} from '@angular/material/card'; import { OverviewComponent } from './overview/overview.component'; import { ErrorComponent } from './error/error.component'; import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; @NgModule({ declarations: [ Loading @@ -20,6 +23,8 @@ import {MatCardModule} from '@angular/material/card'; HeaderComponent, FooterComponent, SelectGameComponent, OverviewComponent, ErrorComponent, ], imports: [ BrowserModule, Loading @@ -30,7 +35,8 @@ import {MatCardModule} from '@angular/material/card'; MatButtonModule, MatFormFieldModule, MatInputModule, MatCardModule MatCardModule, MatProgressSpinnerModule, ], providers: [], bootstrap: [AppComponent] Loading
src/app/error/error.component.html 0 → 100644 +10 −0 Original line number Diff line number Diff line <div style="text-align: center; margin-left: 15em; margin-right: 15em; margin-top: 5em;"> <h3> Leider konnte die Seite nicht erreicht werden, bitte überprüfen Sie den Link oder kehren Sie auf die <a href="router.navigate(['/overview'])">Startseite</a> zurück </h3> <br> <mat-progress-spinner color="primary" mode="mode" value="value"> </mat-progress-spinner> </div>