【发布时间】:2017-05-03 07:12:35
【问题描述】:
我在 Angular 2 中使用套接字 io,但遇到以下问题:
this.socket.on('response_navbar', function (data) {
console.log(data.entryTypeCollection);
this.test123();
});
test123() {
console.log('Test');
}
在事件'response_navbar' 到来之后,console.log() 正在工作,但是当我尝试调用函数this.test123(); 时,我收到错误
谁能帮帮我?
【问题讨论】:
标签: angular typescript web socket.io