diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 8d78afb..d84778d 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -13,7 +13,6 @@ import { MarkdownService } from './markdown.service'; import { TerminadoService } from './terminado.service'; import { WebideComponent } from './webide/webide.component'; import { MessagesComponent } from './messages/messages.component'; -import { TestButtonComponent } from './test-button/test-button.component'; import { WebSocketService } from './websocket.service'; import { TerminalComponent } from './terminal/terminal.component'; import { FSMUpdateService } from './fsmupdate.service'; @@ -26,7 +25,6 @@ import { FSMUpdateService } from './fsmupdate.service'; LoginComponent, WebideComponent, MessagesComponent, - TestButtonComponent, TerminalComponent ], imports: [ diff --git a/src/app/test-button/test-button.component.html b/src/app/test-button/test-button.component.html deleted file mode 100644 index 3ce72d4..0000000 --- a/src/app/test-button/test-button.component.html +++ /dev/null @@ -1,4 +0,0 @@ -

- This is {{anchor_id}}. This text will change: {{text}} -

- diff --git a/src/app/test-button/test-button.component.scss b/src/app/test-button/test-button.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/src/app/test-button/test-button.component.ts b/src/app/test-button/test-button.component.ts deleted file mode 100644 index 13f8f2e..0000000 --- a/src/app/test-button/test-button.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Component, Input, OnInit } from '@angular/core'; -import { WebSocketService } from '../websocket.service'; - -@Component({ - selector: 'app-test-button', - templateUrl: './test-button.component.html', - styleUrls: ['./test-button.component.scss'] -}) -export class TestButtonComponent implements OnInit { - @Input() anchor_id: string; - text: string; - constructor(private webSocketService: WebSocketService) { - this.text = 'babylon'; - this.webSocketService = webSocketService; - } - - onClick() { - this.webSocketService.send(this.anchor_id, this.text); - } - - ngOnInit() { - this.webSocketService.observeAnchor(this.anchor_id).subscribe((event) => { - this.text = event.data; - }); - } - -}