diff --git a/src/app/api/history.service.ts b/src/app/api/history.service.ts index 0496674..d43ea74 100644 --- a/src/app/api/history.service.ts +++ b/src/app/api/history.service.ts @@ -9,7 +9,15 @@ export class HistoryService { 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) { diff --git a/src/app/tab2/tab2.page.html b/src/app/tab2/tab2.page.html index 46e4f1b..928e0eb 100644 --- a/src/app/tab2/tab2.page.html +++ b/src/app/tab2/tab2.page.html @@ -7,5 +7,9 @@ - + + + {{ record.inputHistory }} {{ record.outputHistory }} + +