ng-diff-match-patch
ng-diff-match-patch copied to clipboard
Changing left and right strings?
Hi,
Is it possible to change the left and right strings and then call createHtml?
They wont update as createHtml is called inside ngOnInit.
I found a temporary solution by using @ViewChild and creating a simple method based on the code in ngOnInit:
changeStrings(left: string, right: string) { this.el.nativeElement.innerHTML = this.createHtml(this.dmp.getDiff(left, right)); }