applied feedback

This commit is contained in:
lotte
2019-12-20 14:13:31 +01:00
parent 7c39bf4b5f
commit 01ba97af7a
15 changed files with 73 additions and 45 deletions

View File

@@ -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('/')