feat: add history functionality
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
5146b9f04d
commit
821a8505cc
@ -9,7 +9,15 @@ export class HistoryService
|
|||||||
{
|
{
|
||||||
historyArray: HistoryRecord[] = []
|
historyArray: HistoryRecord[] = []
|
||||||
|
|
||||||
constructor(private storage: Storage) { }
|
constructor(private storage: Storage){
|
||||||
|
storage.get('history').then((val) =>
|
||||||
|
{
|
||||||
|
if(val)
|
||||||
|
{
|
||||||
|
this.historyArray = JSON.parse(val);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public saveRecord(record: HistoryRecord)
|
public saveRecord(record: HistoryRecord)
|
||||||
{
|
{
|
||||||
|
@ -7,5 +7,9 @@
|
|||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
<ion-content [fullscreen]="true">
|
<ion-content [fullscreen]="true">
|
||||||
|
<ion-list>
|
||||||
|
<ion-item *ngFor="let record of historyArray; let i = index">
|
||||||
|
<ion-label>{{ record.inputHistory }} <ion-icon name="arrow-forward-outline"></ion-icon> {{ record.outputHistory }}</ion-label>
|
||||||
|
</ion-item>
|
||||||
|
</ion-list>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
Loading…
Reference in New Issue
Block a user