My RoutConfig :
{ path:'/player', name: 'Player', component: PlayerComponent }
The router directive I use :
<a [routerLink]="['Player', {id: 1}]">Player</a>
The give URL on click :
http://localhost/player?id=1
And the question is, how can I get the value of this "id" parameter with the $_GET function of PHP ?
Because right now PHP gives me an error saying that the "id" parameter does not exist. So I guess that angular 2 doesn't forward the parameter to the PHP template file when it loads it.
One of the solution could be to read the parameter with Angular and then load the content with AJAX. But I'm pretty sure there is an obvious solution that I'm missing.
PS : I know I could use the following RouteConfig :
{ path:'/player/:id', name: 'Player', component: PlayerComponent }