Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import {Component} from '@angular/core';
import {StoryService} from '../story.service';
@Component({
selector: 'app-command-entry',
templateUrl: './command-entry.component.html',
styleUrls: ['./command-entry.component.scss']
})
export class CommandEntryComponent {
public Command: string;
constructor(private storyService: StoryService) { }
public submitCommand(): void {
// Send the event on to the service for processing
this.storyService.handlePlayerInput(this.Command);
// Clear the input's text for next time
this.Command = '';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.