@toxicable/lite-router
v0.0.3
Published
Just a little Router that uses similar conventions to @angular/router It dosen't support much only basic url Params. * no guards * no lazyloading * no child routes
Downloads
38
Readme
@toxicable/lite-router
Just a little Router that uses similar conventions to @angular/router It dosen't support much only basic url Params.
- no guards
- no lazyloading
- no child routes
just a nice and easy flat layout with easy to access param data
However, it only weighs ~10kb
Installation
yarn add @toxicable/lite-router
Import
imports: [
LiteRouterModule.withRoutes([
{ path: 'home/:name', component: Comp3},
{ path: 'home', component: Comp2 },
{ path: '', component: Comp1},
])
]
lr-outlet
<lr-outlet></lr-outlet>
routerLink
<button lrLink="./some-route">Some Route!</button>
or
<a lrLink="./some-route">Some Route!</a>
LiteRouter
constructor(
private readonly router: LiteRouter
){
router.params.subscibe(params => console.log(params));
}