Giter VIP home page Giter VIP logo

angular-bootstrap-simple-chat's People

Contributors

a1essar avatar afloyd avatar aitorllj93 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-bootstrap-simple-chat's Issues

submitFunction error

This type error is raised:

TypeError: $scope.submitFunction(...) is not a function
at ChatCtrl.submitFunction (index.js:128)
at angular.js:12474
at f (angular.js:21700)
at n.$eval (angular.js:14570)
at n.$apply (angular.js:14669)
at HTMLFormElement. (angular.js:21705)
at HTMLFormElement.c (angular.js:3047)

Any idea why this happens? Is there an updated version I should download?

chatTemplate

I have this message error console but i don t know what to do...
capture

Chat doesn't show

I don't understand why my chat doesnt show. It works when I am developing locally, but when I use Grunt to build, then its hidden for some reason.

Do you know why?

This is what I write, which is pretty much the same as the docs

<irontec-simple-chat
  messages="vm.messages"
  username="vm.username"
  input-placeholder-text="You can write here"
  submit-button-text="Send your message"
  title="Public Chat"
  theme="material"
  submit-function="vm.sendMessage"
  visible="true">
  </irontec-simple-chat>

I am using the following

"angular-bootstrap-simple-chat": "~0.3.1",
"angularjs-scroll-glue": "~0.0.1"

Bower.json needs update for external template

needed to inject 2 additional files to make it work:

<link rel="stylesheet" href="bower_components/angular-bootstrap-simple-chat/src/css/themes.css" />
<script src="bower_components/angular-bootstrap-simple-chat/src/scripts/templates.js"></script>

No possibility to change messages array

Hi,

I am using your control for 1on1 chat, however I have several users in the list and when I switch between them, I am changing the messages array.
Currently, since you are using vm.messages in the control, I am not able to change the messages array to display. So when I once select the user and set the messages array, I am not able to change it in the control.
I have cloned your repo and changed the line
'

' +

to

'

' +

Is there any reason to lock the messages array in the local scope?
May be it would be better to make it optional, or just push my changes, what do you think about it?

Scroll $ is not defined

When I try to do a bower install it says that "angularjs-scroll-glue": "~0.0.1" so i use the recomended 2.2.0 instead. However upon deploy I get a few errors related to the scroll.

angular.js:14199 TypeError: Cannot read property 'scrollTop' of undefined

angular.js:14199 ReferenceError: $ is not defined
    at Object.link (http://localhost:8000/bower_components/angular-bootstrap-simple-chat/src/scripts/index.js:44:4)
    at http://localhost:8000/bower_components/angular/angular.js:1259:18
    at http://localhost:8000/bower_components/angular/angular.js:10146:44
    at invokeLinkFn (http://localhost:8000/bower_components/angular/angular.js:10152:9)
    at nodeLinkFn (http://localhost:8000/bower_components/angular/angular.js:9551:11)
    at http://localhost:8000/bower_components/angular/angular.js:9886:13
    at processQueue (http://localhost:8000/bower_components/angular/angular.js:16696:28)
    at http://localhost:8000/bower_components/angular/angular.js:16712:27
    at Scope.$eval (http://localhost:8000/bower_components/angular/angular.js:17994:28)
    at Scope.$digest (http://localhost:8000/bower_components/angular/angular.js:17808:31) <div ng-show="visible" class="row chat-window col-xs-5 col-md-3 {{vm.theme}} ng-isolate-scope" ng-class="{minimized: vm.isHidden}" messages="vm.messages" username="vm.username" input-placeholder-text="You can write here" submit-button-text="Send your message" title="Super Awesome Chat" theme="material" submit-function="vm.sendMessage" visible="vm.visible" expand-on-new="vm.expandOnNew">

Any suggestions on how to fix this?

How can i open multiple chat windows?

What is expandOnNew ?

How can I open multiple chat windows, for example on click of each user in online users list?

I have

  • I want on click on each user to open its own chatting window.

    When new message arrives scroll glue bottom doesnt scroll all the way down the container

    I had this issue incorporating the chat into my application.

    in order to get that to work, i had to use a second $scope.$apply() everytime a message was pushed to the messages array.

    the fix follows:

    var directive = {
                restrict: 'EA',
                template: chatTemplate,
                replace: true,
                scope: {
                    messages: '=',
                    username: '=',
                    inputPlaceholderText: '@',
                    submitButtonText: '@',
                    title: '@',
                    theme: '@',
                    submitFunction: '&'
                },
                link: link,
                controller: function($scope, $timeout) {
                    var _this = this;
                    var isHidden = false;
    
                    _this.messages = $scope.messages;
                    _this.username = $scope.username;
                    _this.inputPlaceholderText = $scope.inputPlaceholderText;
                    _this.submitButtonText = $scope.submitButtonText;
                    _this.title = $scope.title;
                    _this.theme = 'chat-th-' + $scope.theme;
                    _this.writingMessage = '';
                    _this.submitFunction = function() {
                        $scope.submitFunction()(_this.writingMessage, _this.username);
                        _this.writingMessage = '';
                        $timeout(function() {
                            $scope.$apply();
                        }, 0, false);
                    };
                    _this.panelStyle = {'display': 'block'};
                },
                controllerAs: 'vm'
            };
    
            function link(scope, element) {
                if (!scope.inputPlaceholderText) {
                    scope.inputPlaceholderText = 'Write your message here...';
                }
                if (!scope.submitButtonText || scope.submitButtonText === '') {
                    scope.submitButtonText = 'Send';
                }
                if (!scope.title) {
                    scope.title = 'Chat';
                }
            }
    
            return directive;
        }
    })();

    Hope that can help.

    ChatBox

    Hello, How I can doit an PopupBox with this chat?

    Thanks.

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google โค๏ธ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.