【发布时间】:2020-12-06 03:47:29
【问题描述】:
我正在尝试开发一个聊天机器人。请看下面,看看我哪里错了
import { Injectable } from '@angular/core';
import * as Pusher from 'pusher-js';
// this is here to discourage the instantianting of pusher any where its
// needed, better to reference it from one place
@Injectable()
export class PusherService {
private _pusher: any;
constructor() {
this._pusher = new Pusher ('APP_KEY', {
cluster: 'eu',
encrypted: true
});
}
getPusher() {
return this._pusher;
}
}
【问题讨论】:
-
这个问题缺少提供答案所需的信息——为什么你说事情“出了问题”?运行代码时什么都没有发生?你有错误吗?
标签: angular typescript