Skip to content

Document Link Missing HREF #74

Description

@deckar01

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions