Files
start-os/web/projects/shared/src/util/get-pkg-id.ts
Matt Hill 86567e7fa5 rename frontend to web and update contributing guide (#2509)
* rename frontend to web and update contributing guide

* rename this time

* fix build

* restructure rust code

* update documentation

* update descriptions

* Update CONTRIBUTING.md

Co-authored-by: J H <2364004+Blu-J@users.noreply.github.com>

---------

Co-authored-by: Aiden McClelland <me@drbonez.dev>
Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com>
Co-authored-by: J H <2364004+Blu-J@users.noreply.github.com>
2023-11-13 21:22:23 +00:00

12 lines
259 B
TypeScript

import { ActivatedRoute } from '@angular/router'
export function getPkgId({ snapshot }: ActivatedRoute): string {
const pkgId = snapshot.paramMap.get('pkgId')
if (!pkgId) {
throw new Error('pkgId is missing from route params')
}
return pkgId
}