my url is :
http://localhost/#/foo;nb=25;page=1
in the component linked to this url, I do :
ngOnInit() {
this.queryParamSub = this._route.queryParams.subscribe(queryParams => {
console.log(queryParams)
})
}
However, I keep getting an empty object as queryParams. I did try with my url as : http://localhost/#/foo?nb=25&page=1 and it worked fine. Any idea how can I solve this issue if I want to use the matrix notation ?
EDIT this._route is ActivatedRoute
EDIT Here is my app-routing.module.ts
@NgModule({
imports: [
RouterModule.forChild([
{
path: "",
component: AppComponent,
children: [
{
path: "foo",
component: HomepageComponent,
data: {
name: 'home'
}
}
]
}]
)
],
exports: [
RouterModule
]
})
export class AppRoutingModule {}
The component in which I try to get the query param is HomepageComponent