mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-01-16 02:41:56 +00:00
Remove unused ngOnInit
This commit is contained in:
parent
e42d831138
commit
c4c875ae3d
@ -1,11 +1,10 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
templateUrl: './app.component.html',
|
templateUrl: './app.component.html',
|
||||||
styleUrls: ['./app.component.scss']
|
styleUrls: ['./app.component.scss']
|
||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent {
|
||||||
constructor() {}
|
constructor() {}
|
||||||
ngOnInit() {}
|
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ export class MessagesComponent implements OnInit {
|
|||||||
this.websocketService.connect();
|
this.websocketService.connect();
|
||||||
this.websocketService.observeAnchor<Message>('message').subscribe(
|
this.websocketService.observeAnchor<Message>('message').subscribe(
|
||||||
(event) => {
|
(event) => {
|
||||||
|
console.log(event.data);
|
||||||
this.messages.push(event.data);
|
this.messages.push(event.data);
|
||||||
event.data.message = this.convert(event.data.message);
|
event.data.message = this.convert(event.data.message);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user