Implement webide file changing with poc text input

This commit is contained in:
Kristóf Tóth 2018-02-07 13:16:14 +01:00
parent 451ee47825
commit a9d2dd57bc
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,6 @@
<input [(ngModel)]="filename">
<button (click)="selectCode(); requestCode()" type="submit" class="btn btn-primary">Select file</button>
<div
ace-editor
[(text)]="code"

View File

@ -44,4 +44,10 @@ export class WebideComponent implements OnInit {
});
}
selectCode() {
this.webSocketService.send(this.anchor_id, {
'command': 'select',
'filename': this.filename
});
}
}