Skip to content

Commit

Permalink
fix: pass exact option when parsing route params (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav authored Jul 23, 2020
1 parent 03ad384 commit 156f01e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/angular-routing/src/lib/router.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ export class RouterComponent implements OnInit, OnDestroy {
}

setRoute(url: string, route: Route) {
const pathInfo = match(this.normalizePath(route.path))(url);
const pathInfo = match(this.normalizePath(route.path), {
end: route.options.exact,
})(url);
this.basePath = route.path;

const routeParams: Params = pathInfo ? pathInfo.params : {};
Expand Down

0 comments on commit 156f01e

Please sign in to comment.