mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 18:14:17 +00:00
applied feedback
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
/**
|
||||
* Util function to retrieve the current path (without query parameters) the user is on
|
||||
* @param router The router service
|
||||
*/
|
||||
export function currentPath(router: Router) {
|
||||
const urlTree = router.parseUrl(router.url);
|
||||
return '/' + urlTree.root.children.primary.segments.map((it) => it.path).join('/')
|
||||
|
Reference in New Issue
Block a user