angular-bootstrap-simple-chat
angular-bootstrap-simple-chat copied to clipboard
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"
For some reason class ng-hide is added, thus it is hidden
Here is the angular html generated in chrome
<div class="row col-xs-12 chat-container ng-scope" ng-controller="PublicChatController as pc">
<div ng-show="visible" class="row chat-window col-xs-5 col-md-3 chat-th-material ng-hide"
ng-class="{minimized: vm.isHidden}" messages="pc.messages" username="pc.username"
input-placeholder-text="You can write here" submit-button-text="Send your message"
title="Public Chat - Must be logged in to chat" theme="material" submit-function="pc.sendMessage" visible="">
<div class="col-xs-12 col-md-12">
<div class="panel">
<div class="panel-heading chat-top-bar">
<div class="col-md-8 col-xs-8"><h3 class="panel-title ng-binding"><span class="fa fa-comment-o"></span> Public
Chat - Must be logged in to chat</h3></div>
<div class="col-md-4 col-xs-4 window-actions" style="text-align: right;"><span
class="fa fa-angle-double-down icon_minim" ng-class="vm.chatButtonClass" ng-click="vm.toggle()"></span><span
class="fa fa-close" ng-click="vm.close()"></span></div>
</div>
<div class="panel-body msg-container-base" ng-style="vm.panelStyle" style="display: block;">
<!-- ngRepeat: message in vm.messages -->
<div class="row msg-container ng-scope" ng-repeat="message in vm.messages"
ng-init="selfAuthored = vm.myUserId == message.fromUserId">
<div class="col-md-12 col-xs-12">
<div class="chat-msg chat-msg-sent"
ng-class="{'chat-msg-sent': selfAuthored, 'chat-msg-recieved': !selfAuthored}"><span
class="hide ng-binding">myUserId:</span><!-- ngIf: message.imageUrl --><p class="ng-binding">Hello all!
You can finally use chat function!</p>
<div class="chat-msg-author"><strong class="ng-binding">cash</strong> <span
class="date ng-binding"></span></div>
</div>
</div>
</div>
<!-- end ngRepeat: message in vm.messages --></div>
<div class="panel-footer chat-bottom-bar">
<form style="display:inherit" ng-submit="vm.submitFunction()" class="ng-pristine ng-valid">
<div class="input-group"><input type="text"
class="form-control input-sm chat-input ng-pristine ng-untouched ng-valid"
placeholder="You can write here" ng-model="vm.writingMessage"><span
class="input-group-btn"><input type="submit" class="btn btn-sm chat-submit-button"
value="Send your message"></span></div>
</form>
</div>
</div>
</div>
</div>
</div>
@aitorllj93 Would love some help
@cash1981 did you find a solution ? same issue
Yes I did find a work around. Not sure how I did it as I don't remember. But here is the code I use today
`
@cash1981 ok, thank you !
I changed var vm to $scope.vm, it worked.