kst-chat
v0.3.1
Published
chat component for rocket.chat;for ng6
Downloads
57
Readme
KstChat
chat component for rocket.chat
依赖说明
- bootstrap4的样式文件
安装说明
- 1.x 针对angular7.x
- 2.x 针对angular6.x
安装
npm install kst-chat || yarn add kst-chat
入口module 里面 导入模块
StoreModule
,如果本身你的应用使用了ngrx,请忽略入口module导入模块
KstChatModule.forRoot({ url: 'http://192.168.31.137:8818', register: { secretURL: '4PjnyEkwb4zP3JaNo' }, websocket: { url: 'ws://192.168.31.137:8818/websocket' }, file: { uploadUrl: 'http://oss.kingsmartech.com/api/kstfile/files/upload', getFileUrl: `http://oss.kingsmartech.com/api/kstfile/files/www/{fileid}` } })
angular.json中 styles节点加入
"node_modules/kst-chat/src/styles.less"
使用
<kst-chat [user]="currentUser" channel="test1"></kst-chat>
currentUser: any = { appUserName: '张三', username: 'zhangsan', userId: 23, chatpwd: '123456' };