kst-chat
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

KstChat

chat component for rocket.chat

依赖说明

  • bootstrap4的样式文件

安装说明

  • 1.x 针对angular7.x
  • 2.x 针对angular6.x

安装

  1. npm install kst-chat || yarn add kst-chat

  2. 入口module 里面 导入模块StoreModule,如果本身你的应用使用了ngrx,请忽略

  3. 入口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}`
      }
    })
  4. angular.json中 styles节点加入"node_modules/kst-chat/src/styles.less"

  5. 使用

     
     <kst-chat [user]="currentUser" channel="test1"></kst-chat>
     
    currentUser: any = {
        appUserName: '张三',
        username: 'zhangsan',
        userId: 23,
        chatpwd: '123456'
    };
     

Readme

Keywords

none

Package Sidebar

Install

npm i kst-chat

Weekly Downloads

0

Version

0.3.1

License

MIT

Unpacked Size

526 kB

Total Files

168

Last publish

Collaborators

  • gexiaoxu