Skip to content

Commit

Permalink
Step 12.21: Implement location message view
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and darkbasic committed Oct 16, 2017
1 parent 0172a8a commit 8d3c5e3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pages/messages/messages.html
Expand Up @@ -19,6 +19,12 @@
<div *ngFor="let message of day.messages" class="message-wrapper">
<div [class]="'message message-' + message.ownership">
<div *ngIf="message.type == 'text'" class="message-content message-content-text">{{message.content}}</div>
<div *ngIf="message.type == 'location'" class="message-content message-content-text">
<agm-map [zoom]="getLocation(message.content).zoom" [latitude]="getLocation(message.content).lat" [longitude]="getLocation(message.content).lng">
<agm-marker [latitude]="getLocation(message.content).lat" [longitude]="getLocation(message.content).lng"></agm-marker>
</agm-map>
</div>

<span class="message-timestamp">{{ message.createdAt | amDateFormat: 'HH:mm' }}</span>
</div>
</div>
Expand Down

0 comments on commit 8d3c5e3

Please sign in to comment.