I work on angular 7 app I face issue when route to component report details
using router link it only create URL link on browser but not redirect to
component report details until I click Enter.
It only working routing correctly if I use href .
If I use href or router link two both generate same URL link
http://localhost:4200/reportdetails?id=2028
If I use router Link I write router link as :
"['/reportdetails']" [queryParams]="{id: subrep.reportID}" >
When use href I write as below :
"/reportdetails?id={{subrep.reportID}}">
approutingmodule.ts :
const routes: Routes = [ {path:'',redirectTo: 'ReportCategoryComponent', pathMatch: 'full'}, {path:'report',component:ReportCategoryComponent}, {path:'reportdetails',component:ReportdetailsComponent}, {path:'reportdetails/:id',component:ReportdetailsComponent} ];
so How to solve of issue of router link redirect?