angular-bootstrap-simple-chat
angular-bootstrap-simple-chat copied to clipboard
Re-link controller and scope 'messages' array objects
This should solve Issue #4 for those who are experiencing it. I had a very basic setup of this directive and was unable to change the messages array in the directive controller through the sendMessage function. Adding this line forces the directive to resync the controller array object, which is displayed in the chat window, with the scope array object, which is generated outside of the directive. Not sure why the two way binding seems to fail in certain installations, but this fixes it with minimal penalty.