So I am trying to navigate to a timesheet route.
The route takes a name for an employee as a router parameter, and a start and end date as query parameters.
this.router.navigate(['/timesheet', this.name], { queryParams: { start_date: startString, end_date: endString }});
My route.js looks like this:
{
path: 'timesheet/:artistName',
component: TimesheetComponent,
canActivate: [RoleGuardService],
data: {roles: ['consume:admin', 'consume:exec', 'consume:producer' ]},
resolve: {
timesheet: TimesheetResolve
},
}
The URL that is formed when I try and hit the REST backend has null values in for start_date and end_date.
GET http://localhost:4200/api/v1/timesheet/artist/Jimmy?start_date=null&end_date=null 500 (Internal Server Error)
I have checked that both the values i am passing for start and end date are non null.
Any ideas what I am doing wrong here? Thanks in advance...