title: GET URL parameter in angular 4 / 5
body: <p>I'm trying to pass an URL using the GET method. </p>
  
  <p>Actually a microcontroller is sending the GET sequence to a specific web page. On the Web site, I'm trying to get the parameters embedded in the GET sequence for further storage and processing.
  When I write directly the destination URL in chrome, it works with two methods :</p>
  
  <pre><code>    this.activatedRoute.queryParams.subscribe((params: Params) =&gt; {
      console.log(params);
      this.device_id = params.ID;
      this.Voltage = params.Voltage;
      console.log(this.device_id);
      console.log(this.Voltage);
  
      this.device_id = this.activatedRoute.snapshot.params['ID'];
      console.log(this.device_id);
      this.Voltage = this.activatedRoute.snapshot.params['Voltage'];
      console.log(this.Voltage);
  
      });
  </code></pre>
  
  <p>The first method with queryParams is when I send this URL : (<a href="http://www.quatuoradbd.com/Reception?ID=00-80-56-de-fr-00-d8-af&amp;Voltage=2650" rel="nofollow noreferrer">http://www.quatuoradbd.com/Reception?ID=00-80-56-de-fr-00-d8-af&amp;Voltage=2650</a>)</p>
  
  <p>the second method with snapshot is when I send this URL :
  (<a href="http://www.quatuoradbd.com/00-80-56-de-fr-00-d8-af/2650" rel="nofollow noreferrer">http://www.quatuoradbd.com/00-80-56-de-fr-00-d8-af/2650</a>)</p>
  
  <p>These two methods work when I pass the URL directly in the bar navigator.</p>
  
  <p>But when those URL's are sent by a microcontroller, it doesn't work.
  I know that it should work because when my previous version of web site was written in PHP, everything was doing fine.</p>
  
  <p>On the web server side, I receive parameters (by parameters I mean the resource address appended to the domain name) with :</p>
  
  <pre><code>    if(isset($_GET['Nbres']) OR isset($_GET['Local']))
      {
      $Nbres=$_GET['Nbres'];
      $Local=$_GET['Local'];
      }
  </code></pre>
  
  <p>But I don't understand why with Angular 4 (and 5) it doesn't work. </p>
  
  <p>In Angular 4, is there a parameter that has to be modified? Or could this be coming from a specific router parameter that must be set? ... or a parameter on the server?
  If anyone as a hint, I would appreciate.</p>
  
  <p>I join you my index.html, my app-routing.module.ts if it can help.</p>
  
  <p>my index.html</p>
  
  <pre><code>    &lt;!doctype html&gt;
      &lt;html lang="en"&gt;
      &lt;head&gt;
         &lt;meta charset="utf-8"&gt;
         &lt;title&gt;Connectedfuture&lt;/title&gt;
         &lt;base href="/"&gt;
  
         &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
         &lt;link rel="icon" type="image/x-icon" href="favicon.ico"&gt;
         &lt;script&gt;document.write('&lt;base href="' + document.location + '" /&gt;');
         &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
        &lt;app-root&gt;&lt;/app-root&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p>my app-routing.module.ts</p>
  
  <pre><code>    const routes: Routes = [
         { path: '', redirectTo: '/Accueil', pathMatch: 'full' },
         { path: 'ConfirmationCompte/:email', component: 
         ConfirmationCompteComponent },
         { path: 'Graphiques/:id', component: GraphiquesComponent },
         { path: 'Accueil', component: AccueilComponent },
         { path: 'Projets', component: ProjetsComponent },
         { path: 'Clients', component: ClientsComponent },
         { path: 'Histoire', component: HistoireComponent },
         { path: 'Inscription', component: InscriptionComponent },
         { path: 'Identification', component: IdentificationComponent },
         { path: 'Reception/:ID/:Voltage', component: ReceptionComponent },
         { path: 'Reception', component: ReceptionComponent },
         { path: 'Map', component: MapComponent },
         { path: 'App/:ID/:Voltage', component: AppComponent },
         { path: '**', component: InconnuComponent }
      ];
      @NgModule({
        imports: [RouterModule.forRoot(routes)],
        exports: [RouterModule]
      })
  </code></pre>