Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 651 Bytes

README.md

File metadata and controls

25 lines (18 loc) · 651 Bytes

@schaman/angular-router-params

Get router parameters in the easiest way.

Provide, inject and use the service.

@Component({
  /* ... */
  providers: [SchamanRouterParams],
})
class ExampleComponent {
  public id$ = this.routerParams.id$;
  public carId$ = this.routerParams['carId'];
  public constructor(private routerParams: SchamanRouterParams) {}
}

Browser-compatibility

The library uses Proxy. See compatibility.

Running unit tests

Run nx test angular-router-params to execute the unit tests.