Skip to content

Commit

Permalink
Restore page navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Toxantron committed Sep 27, 2020
1 parent b86c6d4 commit 82f7e15
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/create/create.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Observable, of } from 'rxjs';
import { Session } from '../session';
import { CardSet } from '../cardset';
import { SessionService } from '../session.service';
import { Router } from '@angular/router';

@Component({
selector: 'create-session',
Expand All @@ -19,7 +20,9 @@ export class CreateComponent implements OnInit {
cardSets: CardSet[] = [];
selectedSet: CardSet = new CardSet([]);

constructor(private sessionService : SessionService) {
constructor(
private sessionService : SessionService,
private router: Router) {
}

ngOnInit() {
Expand All @@ -40,7 +43,7 @@ export class CreateComponent implements OnInit {
this.nameError = true;

this.sessionService.createSession(this.session).subscribe(id => {
// TODO: Navigate to master view
this.router.navigate(['/session', id])
});
}
}

0 comments on commit 82f7e15

Please sign in to comment.