Skip to content

Instantly share code, notes, and snippets.

@jim-clark
Last active August 29, 2015 14:24
Show Gist options
  • Save jim-clark/985ff9d22817d9917f28 to your computer and use it in GitHub Desktop.
Save jim-clark/985ff9d22817d9917f28 to your computer and use it in GitHub Desktop.
Code for MEAN with Socket.IO
<!-- Add this HTML to the end of the existing HTML, just above the Socket.IO script. -->
<hr>
<div class="row">
<div class="col-xs-4">
<h4>Hippo Live Chat</h4>
</div>
<div class="col-xs-8 text-right">
<label>Your Name:</label> <input type="text" ng-model="username">&nbsp;&nbsp;
<button ng-click="sendMsg()" class="btn btn-success">Send Message</button>
</div>
</div>
<div class="row">
<textarea ng-model="newMsg" class="form-control" style="resize:none" placeholder="enter message"></textarea><br>
</div>
<div class="row list-group">
<div class="list-group-item" ng-repeat="m in messages">
<h4 class="list-group-item-heading">{{m.user}}</h4>
<p class="list-group-item-text">{{m.message}}</p>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment