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

Document Link Missing HREF #74

Open
deckar01 opened this issue Feb 1, 2022 · 0 comments
Open

Document Link Missing HREF #74

deckar01 opened this issue Feb 1, 2022 · 0 comments

Comments

@deckar01
Copy link

deckar01 commented Feb 1, 2022

Issue

The collection view has a href="#" stub for document ID links. Navigation is handled by a JavaScript click event. This breaks the UX of copying links or opening them in a new tab.

Background

<a href="#" (click)="goToDocument($event)">{{ json._id?.$value }}</a>

goToDocument(event) {
event.preventDefault();
this.go.emit(this.json._id.$value);
}

go(documentId) {
this.router.navigate([
'servers', this.server,
'databases', this.database,
'collections', this.collection,
'documents', documentId
]);
}

Proposal

Use a routerLink directive in pretty-json.component.html.

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

1 participant