diff --git a/src/main/webapp/app/entities/army/army-detail.component.ts b/src/main/webapp/app/entities/army/army-detail.component.ts index 4f9c1e74..e6405016 100644 --- a/src/main/webapp/app/entities/army/army-detail.component.ts +++ b/src/main/webapp/app/entities/army/army-detail.component.ts @@ -18,7 +18,6 @@ export class ArmyDetailComponent implements OnInit { units: IArmy['units'] | null = null; private forcePoints: number; @LocalStorage('forceAddedListStored') - // @LocalStorage('ArmyStored') public forceUnitList: ForceUnit[]; private responsiveService: ResponsiveService = new ResponsiveService(); public isMobileResolution: boolean; @@ -132,8 +131,8 @@ export class ArmyDetailComponent implements OnInit { } clearForce(): void { - localStorage.clear(); this.forceUnitList = []; this.forcePoints = 0; + localStorage.setItem('forceAddedListStored', JSON.stringify(this.forceUnitList)); } } diff --git a/src/main/webapp/app/entities/force/force.component.ts b/src/main/webapp/app/entities/force/force.component.ts index bc16cd35..86e82540 100644 --- a/src/main/webapp/app/entities/force/force.component.ts +++ b/src/main/webapp/app/entities/force/force.component.ts @@ -96,8 +96,8 @@ export class ForceComponent implements OnInit { } clearList(): void { - localStorage.clear(); this.forceList = []; + localStorage.setItem('forceAddedListStored', JSON.stringify(this.forceList)); } byteSize(base64String: string): string {