From 34e2cc2e393658a6792f8df4eed6e4965e6aafd3 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 19 Jan 2018 14:58:52 -0500 Subject: [PATCH] lazy load history changes --- .../app/tools/password-generator-history.component.html | 5 ++++- .../app/tools/password-generator-history.component.ts | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/popup/app/tools/password-generator-history.component.html b/src/popup/app/tools/password-generator-history.component.html index 6f207e8744..0508627b5a 100644 --- a/src/popup/app/tools/password-generator-history.component.html +++ b/src/popup/app/tools/password-generator-history.component.html @@ -8,7 +8,7 @@
{{$ctrl.i18n.passwordHistory}}
-
+
@@ -27,4 +27,7 @@
+
+ +
diff --git a/src/popup/app/tools/password-generator-history.component.ts b/src/popup/app/tools/password-generator-history.component.ts index 5b165e03da..38abdcf39f 100644 --- a/src/popup/app/tools/password-generator-history.component.ts +++ b/src/popup/app/tools/password-generator-history.component.ts @@ -10,11 +10,16 @@ export class PasswordGeneratorHistoryController { editState: any; addState: any; i18n: any; + loaded: boolean = false; constructor(private $state: any, private passwordGenerationService: PasswordGenerationService, private toastr: any, private $analytics: any, private i18nService: any) { this.i18n = i18nService; - this.history = passwordGenerationService.getHistory(); + + passwordGenerationService.getHistory().then((history) => { + this.history = history; + this.loaded = true; + }); } $onInit() {