Q:

pass two parameter in routing in angular 6

i am passing two parameter with route but its not working.
when i click on routerLink it is redirecting me to my default route.
means there is no route who is accepting parameters.
What am i missing..?
THANKS in Advance.
paht is:
{path:'Buy/:term1/:term2', component: Buycomponent}

and i am passing parameters like this:
<a [routerLink] ="['/Buy',{term1:'sale',term2:'home'}]">data</a>

in component i am getting parameters like this:
this.route.params.subscribe(response => console.log(response.term1 , responce.term2));  

.
Updated...
for single value it is working fine.
{path:'Buy/:term1, component: Buycomponent}

and passing parameter like this:
<a [routerLink] ="['/Buy','sale']">data</a>

in component i am getting parameters like this: 
this.route.params.subscribe(response => console.log(response.term1));

A:

Try this:
<a [routerLink] ="['/Buy','sale','home']">data</a>

Use this syntax when you want to pass optional parameters
<a [routerLink] ="['/Buy',{term1:'sale',term2:'home'}]">data</a>

