diff2html icon indicating copy to clipboard operation
diff2html copied to clipboard

File list links are not working in Angular integration for diff2html-ui

Open sogistuvsogistuv opened this issue 2 years ago • 1 comments

We are really grateful for the work you put into this project and so far it worked like charm.

However, I have a question, or rather a request for assistance, pertaining to the links within the file list. I'm currently utilizing the latest diff2html-ui in with with Angular 13, configured essentially as follows: const configuration = { drawFileList: true, matching: 'none', highlight: true, outputFormat: 'line-by-line', renderNothingWhenEmpty: true };

Each entry in the file list is clickable and supposed to lead to the corresponding anchor. As I understand the linkId is generated by using a simple hash function (link to code). The issue in my Angular application is that these link just reload the page, as there is no router for these "dynamic" ids. How can I make these links functional within the Angular framework?

A temporary solution would be to deactivate the links, but from my understanding, this requires overwriting the template. Is there an alternative approach?

I also created a stackoverflow question regarding this matter ,but I have reservations about receiving a response there, which is why I've raised this issue here.

Could you please provide guidance on resolving this Angular integration challenge with the diff2html-ui file list links?

sogistuvsogistuv avatar Sep 04 '23 19:09 sogistuvsogistuv

See also:

  • https://github.com/afnanenayet/diffsitter/issues/155

0xdevalias avatar Jan 30 '24 05:01 0xdevalias