Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat doesn't show #10

Open
cash1981 opened this issue Oct 6, 2015 · 7 comments
Open

Chat doesn't show #10

cash1981 opened this issue Oct 6, 2015 · 7 comments

Comments

@cash1981
Copy link

cash1981 commented Oct 6, 2015

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"
@cash1981
Copy link
Author

cash1981 commented Oct 6, 2015

For some reason class ng-hide is added, thus it is hidden

@cash1981
Copy link
Author

cash1981 commented Oct 6, 2015

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>&nbsp;<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>

@cash1981
Copy link
Author

cash1981 commented Oct 6, 2015

@aitorllj93 Would love some help

@lcardosozago
Copy link

@cash1981 did you find a solution ? same issue

@cash1981
Copy link
Author

cash1981 commented Feb 1, 2016

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

`



`

And here is the PublicChatController

@lcardosozago
Copy link

@cash1981 ok, thank you !

@mauriciobaccin
Copy link

I changed var vm to $scope.vm, it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants