Last active
August 29, 2015 14:24
-
-
Save jim-clark/985ff9d22817d9917f28 to your computer and use it in GitHub Desktop.
Code for MEAN with Socket.IO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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"> | |
<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