UNPKG
glimmer-router
Version:
latest (0.0.1)
0.0.1
Proof of concept routing in glimmer.js
github.com/thoov/glimmer-router
thoov/glimmer-router
glimmer-router
/
src
/
utils
/
get-router.ts
8 lines
(6 loc)
•
198 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
export
default
function
getRouter
(
context
) {
if
(!context || !context.
__owner__
) {
throw
new
Error
(
'Could not find the router on the given context'
); }
return
context.
__owner__
.
router
; }