Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sogistuvsogistuv opened this issue Sep 4, 2023 · 2 comments

Comments

@sogistuvsogistuv
Copy link

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?

@rtfpessoa
Copy link
Owner

👋 Unfortunately I don't have a lot of frontend experience and specially with angular and I mostly used react.
Usually the id should be handled by the browser not even angular, but I guess angular is hijacking the process.

Maybe this can work https://stackoverflow.com/a/48278151?

@rtfpessoa
Copy link
Owner

Closing due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants