SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <ng-container *ngIf="messages$.length; else loading">
  2.     <ion-grid>
  3.       <ion-row *ngFor="let message of messages$">
  4.         <ion-col
  5.           *ngIf="id === message.id"
  6.           size="9"
  7.           offset="3"
  8.           class="message my-message"
  9.           [ngStyle]="{ background: message.isUrgent ? 'var(--ion-color-danger)' : 'var(--ion-color-primary)' }"
  10.         >
  11.           <img *ngIf="message.image" [src]="message.image" />
  12.           <video *ngIf="message.video">
  13.             <source src="message.video" type="video/mp4" />
  14.           </video>
  15.           <div *ngIf="sentSuccessfully" class="received-message" text-right>
  16.             <img class="success" src="assets/tick.svg" />
  17.           </div>
  18.           <div *ngIf="errorWhileSending" class="received-message" text-right>
  19.             <img class="success" src="assets/tick.svg" />
  20.           </div>
  21.           <p>{{ message.content }}</p>
  22.           <div class="time" text-right>{{ message.timeStamp | date: 'H:H EEE':undefined:'es' }}</div>
  23.           <div class="time" text-right>{{ message.timeStamp | date: 'd MMM yy':undefined:'es' }}</div>
  24.         </ion-col>
  25. <!-- IF MESSAGE IS NOT OURS -->
  26.         <ion-col
  27.           *ngIf="id !== message.id"
  28.           size="9"
  29.           class="message other-message"
  30.           [ngStyle]="{ background: message.isUrgent ? 'var(--ion-color-danger)' : 'var(--ion-color-medium)' }"
  31.         >
  32.           <img *ngIf="message.image" [src]="message.image" />
  33.           <video *ngIf="message.video">
  34.             <source src="message.video" type="video/mp4" />
  35.           </video>
  36.           <p>{{ message.content }}</p>
  37.           <div class="time" text-right>{{ message.timeStamp | date: 'H:H EEE':undefined:'es' }}</div>
  38.           <div class="time" text-right>{{ message.timeStamp | date: 'd MMM yy':undefined:'es' }}</div>
  39.         </ion-col>
  40.       </ion-row>
  41.     </ion-grid>
  42.   </ng-container>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top