Commit 1de125ca authored by Dennis Willers's avatar Dennis Willers 🏀

Change Router Logik

Prepare Tabu.csv for MariaDB
parent c6123ac8
Pipeline #286 passed with stages
in 5 minutes and 27 seconds
1;Elefant;Rüssel;Dickhäuter;Tier;Afrika;grau RoundID;Solution;Tabu1;Tabu2;Tabu3;Tabu4;Tabu5
1;Elefant;Rüssel;Dickhäuter;Tier;Afrika;grau
2;Küche;Koch;Essen;Kühlschrank;Herd;Arbeitsplatte 2;Küche;Koch;Essen;Kühlschrank;Herd;Arbeitsplatte
3;Taschengeld;Ausgeben;Sparen;Jacke;Euro;Eltern 3;Taschengeld;Ausgeben;Sparen;Jacke;Euro;Eltern
4;Schwimmen;Sport;Verein;Wasser;Baden;Kraul 4;Schwimmen;Sport;Verein;Wasser;Baden;Kraul
......
...@@ -7,11 +7,23 @@ import {GameComponent} from './game/game.component'; ...@@ -7,11 +7,23 @@ import {GameComponent} from './game/game.component';
const routes: Routes = [ const routes: Routes = [
{ {
path: 'game/:sessionName/overview', path: ':sessionName',
component: OverviewComponent, component: OverviewComponent,
}, },
{ {
path: 'game', path: ':sessionName/:team',
component: OverviewComponent,
},
{
path: ':sessionName/:team/watchdog',
component: GameComponent,
},
{
path: ':sessionName/:team/explainer',
component: GameComponent,
},
{
path: ':sessionName/:team/guesser',
component: GameComponent, component: GameComponent,
}, },
{ {
......
...@@ -13,6 +13,6 @@ export class OverviewComponent implements OnInit { ...@@ -13,6 +13,6 @@ export class OverviewComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
} }
startGame(): void { startGame(): void {
this.router.navigate(['/game']); this.router.navigate([this.router.url+'/red/watchdog']);
} }
} }
...@@ -28,7 +28,7 @@ export class SelectGameComponent implements OnInit { ...@@ -28,7 +28,7 @@ export class SelectGameComponent implements OnInit {
console.log(value); console.log(value);
const status = JSON.parse(value.status); const status = JSON.parse(value.status);
if (status) { if (status) {
this.router.navigate(['/game/' + spielname + '/overview']); this.router.navigate([spielname]);
} }
}).catch(reason => { }).catch(reason => {
console.log(reason); console.log(reason);
...@@ -37,7 +37,7 @@ export class SelectGameComponent implements OnInit { ...@@ -37,7 +37,7 @@ export class SelectGameComponent implements OnInit {
} }
joinGame(spielname: string): void { joinGame(spielname: string): void {
this.router.navigate(['/game/' + spielname + '/overview']); this.router.navigate([spielname]);
} }
keyPressAlphaNumeric(event: KeyboardEvent): boolean { keyPressAlphaNumeric(event: KeyboardEvent): boolean {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment