Als Nutzer möchte ich Datenänderungen nach verfolgen können #246 #248
| @@ -11,15 +11,15 @@ export class HistoryBtnComponent implements OnInit { | ||||
|   @Input() history: History[] = []; | ||||
|   @Input() translationKey: string = ""; | ||||
|  | ||||
|   showSidebar = false; | ||||
|   public showSidebar: boolean = false; | ||||
| 
					
					edraft marked this conversation as resolved
					
				 | ||||
|  | ||||
|   constructor() { | ||||
|   public constructor() { | ||||
|   } | ||||
|  | ||||
|   ngOnInit(): void { | ||||
|   public ngOnInit(): void { | ||||
|   } | ||||
|  | ||||
|   openHistory(): void { | ||||
|   public openHistory(): void { | ||||
|     this.showSidebar = true; | ||||
|     let oldHistory: Partial<History> = {}; | ||||
|     for (const history of this.history) { | ||||
| @@ -36,7 +36,7 @@ export class HistoryBtnComponent implements OnInit { | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   getAttributeTranslationKey(key: string) { | ||||
|   public getAttributeTranslationKey(key: string): string { | ||||
|     return `common.history.${key}`; | ||||
|   } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	
Darf showSidebar keinen Typen bekommen? :(
public showSidebar: boolean = false;
Je nachdem was showSidebar tut, wäre hier vielleicht ein Store als "Single-Source-Of-Truth" sinnvoll, damit wir hier ein Observable haben.
So kann sich egal wo dieser boolische Wert anpassen und DOM-Elemente anschließened gerendert werden oder eben nicht.
Ist aber wie gesagt abhängig vom Use-Case.
Generell hast du recht. Wäre für das was die Komponente macht jedoch OP.