Skip to content

Commit

Permalink
Merge pull request #28 from halomademeapc/bugfix/#21-topic-not-saved
Browse files Browse the repository at this point in the history
Bugfix/#21 topic not saved
  • Loading branch information
Alex Griffith committed Aug 18, 2020
2 parents 4eabde6 + 17cedee commit 2a3548f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<div class="mb-3">
<div class="input-group">
<input class="form-control" type="text" name="tagline" formcontrolname="tagline" required>
<input class="form-control" type="text" name="tagline" formControlName="tagline" required>
<label for="tagline" class="floating-label">Initial Topic</label>
</div>
</div>
Expand Down Expand Up @@ -75,4 +75,4 @@
Create Room
</button>
</div>
</form>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div *ngIf="player.isHost" class="control-bar" [formGroup]="formGroup">
<div class="input-group subject--input">
<input class="form-control" type="text" formControlName="subject" required [class.is-invalid]="false">
<label for="name" class="floating-label">Current Subject</label>
<label for="name" class="floating-label">Current Topic</label>
</div>
<div class="input-group countdown--input">
<input class="form-control" type="number" min="0" max="600" formControlName="countdown"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FormGroup, FormControl } from '@angular/forms';
styleUrls: ['./host-controls.component.scss']
})
export class HostControlsComponent implements OnInit {
currentTagline: string;
private _currentTagline: string;
countdownIsActive = false;
remainingTime: number;
maxTime: number;
Expand All @@ -23,6 +23,15 @@ export class HostControlsComponent implements OnInit {
countdown: new FormControl('')
});

get currentTagLine() {
return this._currentTagline;
}

set currentTagline(value: string) {
this._currentTagline = value;
this.formGroup.get('subject').setValue(value);
}

constructor(private service: PokerService) { }

ngOnInit() {
Expand Down

0 comments on commit 2a3548f

Please sign in to comment.