mirror of
				https://github.com/avatao-content/frontend-tutorial-framework
				synced 2025-11-04 12:22:54 +00:00 
			
		
		
		
	Implement webide file changing with poc text input
This commit is contained in:
		@@ -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"
 | 
			
		||||
 
 | 
			
		||||
@@ -44,4 +44,10 @@ export class WebideComponent implements OnInit {
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  selectCode() {
 | 
			
		||||
    this.webSocketService.send(this.anchor_id, {
 | 
			
		||||
      'command': 'select',
 | 
			
		||||
      'filename': this.filename
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user