node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



Chat box component for angular


Copy chatbox.min.js bundle to your site and plug it on the page.

$ npm install --save ng-chatbox
<script src="node_modules/ng-chatbox/build/chatbox.min.js"></script>


Define dependency on your angular application like this:

angular.module('application', ['ngChatbox'])

And then, use ngChatbox directive where you want to display message box:

<ng-chatbox ng-model="messages"></ng-chatbox>

Pass array of messages to it. Each message should be an object and contains next fields:

  • text: shown message text
  • time: message time
  • own: customization of message view. Can be empty, 'mine' or 'their'


  • add send message form
  • auto-scroll option and new messages indication
  • expand message on click
  • remove messages
  • override template and styles
  • smiles ;)