irontec / angular-bootstrap-simple-chat Goto Github PK
View Code? Open in Web Editor NEWSimple AngularJS Chat Directive with Bootstrap
Simple AngularJS Chat Directive with Bootstrap
Hello.
I'm testing this module to use in IE 11 (or 10)
when I open "http://localhost:3000/examples" in IE,
Invalid Argument Error
at interpolateFnWatchAction (http://localhost:3000/bower_components/angular/angular.js:8838:17)
at interpolateFnWatcher (http://localhost:3000/bower_components/angular/angular.js:11327:17)
do you have solution?
thanks in advance
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?
How can I have a scroll bar for the chat box like the image do?
Missing Bower components folder ,
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"
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>
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?
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?
Look at this:
http://stackoverflow.com/questions/32895341/grunt-is-removing-scripts-and-css-in-index-html/32962802#32962802
I believe you need to update your bower.json to match the new spec
I get this error after integrating this directive:
Error: [$compile:tpload] http://errors.angularjs.org/1.6.3/$compile/tpload?p0=chatTemplate.html&p1=-1&p2=
How can I show the user name of incoming messages on left side like in the example image?
what is this?
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.
Does this control support multiple instances of the chat window?
The title of the chat is provided via a GET request, how can I update it?
Hopefully I'll have time to add this functionality within the next few days. I'll try to submit a PR
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.
Hello, How I can doit an PopupBox with this chat?
Thanks.
I need hide both buttons, without css.
I'm can change the template of chat??
I'm can create an box similar at facebook chat for this messenger?
Best regards, Ynieves.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.