79199905

Date: 2024-11-18 12:32:02
Score: 0.5
Natty:
Report link

Not correct way to call method from DOM, i suggest to create an obs like BehaviorSubject and setter have just to update this one.

protected jsonStringify = new Subject<string>() // or Behavior

 setJsonString(data: string) {
    this.data = JSON.stringify(JSON.parse(data), null, '\t');
 }
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Yoann ROCHE