Skip to content

Commit

Permalink
Step 8.4: Add picture message type to chat view
Browse files Browse the repository at this point in the history
  • Loading branch information
DAB0mB authored and Dotan Simha committed Nov 23, 2016
1 parent 4a55aa8 commit ccd4b29
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/templates/chat.html
Expand Up @@ -6,7 +6,12 @@
<div class="message-list">
<div ng-repeat="message in chat.messages" class="message-wrapper">
<div class="message" ng-class="message.userId === $root.currentUser._id ? 'message-mine' : 'message-other'">
<div class="message-text">{{ message.text }}</div>
<ng-switch on="message.type">
<div ng-switch-when="text" class="text">{{ message.text }}</div>
<div ng-switch-when="picture" class="picture">
<img ng-src="{{ message.picture }}">
</div>
</ng-switch>
<span class="message-timestamp">{{ message.timestamp | amDateFormat: 'HH:mm' }}</span>
</div>
</div>
Expand Down

0 comments on commit ccd4b29

Please sign in to comment.