ng-diff-match-patch icon indicating copy to clipboard operation
ng-diff-match-patch copied to clipboard

Changing left and right strings?

Open aksellk opened this issue 7 years ago • 0 comments

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

aksellk avatar Jul 04 '17 12:07 aksellk