<!-- <ion-header>
  <ion-toolbar>
    <ion-title>备忘录</ion-title>
  </ion-toolbar>
</ion-header>
<ion-content>
  <div *ngIf="segment === 'memo'">
    <ion-list>
      <ion-item *ngFor="let memo of memos">
        {{ memo }}
        <ion-button slot="end" color="danger" (click)="confirmDeleteMemo(memo)">
          删除
        </ion-button>
      </ion-item>
    </ion-list>

    <ion-item>
      <ion-input placeholder="添加新备忘录" [(ngModel)]="newMemo"></ion-input>
      <ion-button (click)="addMemo()">添加</ion-button>
    </ion-item>
  </div>
</ion-content> -->

<ion-header>
  <ion-toolbar>
    <ion-title>备忘录</ion-title>
  </ion-toolbar>
</ion-header>
<ion-content>

  <div *ngIf="segment === 'memo'">
    <ion-list>
      <ion-item *ngFor="let memo of memos">
        <ion-label>
          {{ memo.content }}
          <p>{{ memo.timestamp | date:'yyyy年MM月dd日 HH:mm:ss' }}</p>
        </ion-label>
        <ion-button slot="end" color="danger" (click)="confirmDeleteMemo(memo)">
          删除
        </ion-button>
      </ion-item>
    </ion-list>

    <ion-item>
      <ion-input placeholder="添加新备忘录" [(ngModel)]="newMemo"></ion-input>
      <ion-button (click)="addMemo()">添加</ion-button>
    </ion-item>
  </div>
</ion-content>
