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.
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
Mongoku/app/src/app/components/pretty-json/pretty-json.component.html
Line 5 in d366b70
Mongoku/app/src/app/components/pretty-json/pretty-json.component.ts
Lines 131 to 134 in d366b70
Mongoku/app/src/app/pages/explore/explore.component.ts
Lines 125 to 132 in d366b70
Proposal
Use a
routerLinkdirective inpretty-json.component.html.