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');
}