<ion-header [translucent]="true">
  <ion-toolbar>
    <ion-title>chat</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content [fullscreen]="true">
  <ion-button fill="clear" routerLink="/tabs/tab2">〈</ion-button>


  <ion-item>
    <ion-input placeholder="输入消息" [(ngModel)]="userInput"></ion-input>
  </ion-item>

  <ion-button expand="block" (click)="sendMessage()">发送</ion-button>

  <ion-card *ngFor="let message of messageList">
    <ion-card-header>
      {{message?.role}}
    </ion-card-header>
    <ion-card-content>
      {{ message?.content }}
    </ion-card-content>
  </ion-card>

</ion-content>
