In angular4 routing, i am trying navigate to specific path with optional parameters but it not navigating to the correct path, Please see the below code
routes i have configured as
{ path:"login",component:"LoginComponent"},
{path:"register",component:"RegisterComponent"},
{path:"**",redirectTo:"register"}
i am routing to login as below
this.router.navigate(["login",{optionalParam:"param"}])
but this is navigating to Register, i could observe in router debugging as url Redirects from "login;optionalParam=param" to "register". what could be the issue, i am facing same issue with queryParameters also.