1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

call into load method

This commit is contained in:
Kyle Spearrin
2018-04-05 23:49:38 -04:00
parent 45ba629371
commit db83cab552
2 changed files with 13 additions and 11 deletions

View File

@@ -25,7 +25,7 @@ import { CipherView } from '../../models/view/cipherView';
import { FieldView } from '../../models/view/fieldView';
import { LoginUriView } from '../../models/view/loginUriView';
export class ViewComponent implements OnChanges, OnDestroy {
export class ViewComponent implements OnDestroy {
@Input() cipherId: string;
@Output() onEditCipher = new EventEmitter<CipherView>();
@@ -48,7 +48,11 @@ export class ViewComponent implements OnChanges, OnDestroy {
protected i18nService: I18nService, protected analytics: Angulartics2,
protected auditService: AuditService) { }
async ngOnChanges() {
ngOnDestroy() {
this.cleanUp();
}
async load() {
this.cleanUp();
const cipher = await this.cipherService.get(this.cipherId);
@@ -67,10 +71,6 @@ export class ViewComponent implements OnChanges, OnDestroy {
}
}
ngOnDestroy() {
this.cleanUp();
}
edit() {
this.onEditCipher.emit(this.cipher);
}