title: Angular 4 : Build to prod: Property is private and only accessible within class
body: <p>i'm using Angular 4 , i'm running : <code>ng build --prod</code></p>
  
  <p>i'm catching this :</p>
  
  <pre><code>ng build --prod
  Your global Angular CLI version (1.2.2) is greater than your local
  version (1.0.0). The local Angular CLI version is used.
  
  To disable this warning use "ng set --global warnings.versionMismatch=false".
  Hash: 7fce5d10c4c3ac9745e8
  Time: 68351ms
  chunk    {0} polyfills.7790a64cc25c48ae62ea.bundle.js (polyfills) 177 kB {4} [initial] [rendered]
  chunk    {1} main.f10680210e9e45ed33cc.bundle.js (main) 382 kB {3} [initial] [rendered]
  chunk    {2} styles.d2e6408caea42ccabf99.bundle.css (styles) 175 bytes {4} [initial] [rendered]
  chunk    {3} vendor.fc69ec31f7ef40b5fffb.bundle.js (vendor) 5.9 MB [initial] [rendered]
  chunk    {4} inline.91747411075ce6c7f438.bundle.js (inline) 0 bytes [entry] [rendered]
  
  ERROR in ng:///D:/Sources/DotNet/NextGCClientWeb/src/app/login/login.component.html (11,3): Property 'activatedRoute' is private and only accessible within class 'Login
  Component'.
  
  ERROR in ng:///D:/Sources/DotNet/NextGCClientWeb/src/app/login/login.component.html (11,3): Property 'activatedRoute' is private and only accessible within class 'Login
  Component'.
  </code></pre>
  
  <p>this error seems to be strange :</p>
  
  <pre><code>ERROR in 
      ng:///D:/Sources/DotNet/NextGCClientWeb/src/app/login/login.component.html (11,3): Property 'activatedRoute' is private and only accessible within class 'Login Component
  </code></pre>
  
  <p>The indicated component in the error is the follwoing :</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { Router, ActivatedRoute, Params } from '@angular/router';
  import { Http, Response } from '@angular/http';
  import { SessionService } from './../../shared/service';
  
  import { User } from './../../model';
  
  @Component({
    selector: 'login',
    templateUrl: './login.component.html',
    styleUrls: ['./login.component.css']
  })
  export class LoginComponent {
    error: string;
    email: string;
    password: string;
    stayConnected: Boolean;
  
    constructor (
      private sessionService: SessionService,
      private router: Router,
      private activatedRoute: ActivatedRoute
    ) {
      if (activatedRoute.snapshot.params['keyWording']) {
        this.sessionService.logInWithFinalization(activatedRoute.snapshot.params['keyWording']);
      }
    }
  
    logIn() {
      this.sessionService.logIn(this.email, this.password, this.stayConnected).subscribe(
        () =&gt; {
          if (this.sessionService.pageRequestedInUnauthenticated == null) {
            this.router.navigate(['/welcome']);
          } else {
            this.router.navigate([this.sessionService.pageRequestedInUnauthenticated]);
          }
        },
        (error: Response) =&gt; this.error = error.json()
      );
    }
  }
  </code></pre>
  
  <p><strong>The html view:</strong></p>
  
  <pre><code>&lt;div id="divLogin"&gt;
    &lt;h1&gt;Se connecter&lt;/h1&gt;&lt;br&gt;
    &lt;i class="fa fa-envelope-o fa-lg" id="iconEmail"&gt;&lt;/i&gt;
    &lt;input type="text" id="email" [(ngModel)]="email" (keyup.enter)="logIn()" class="form-control" placeholder="Adresse email" autofocus /&gt;
    &lt;i class="fa fa-lock fa-lg" id="iconPassword"&gt;&lt;/i&gt;
    &lt;input type="password" id="password" [(ngModel)]="password" (keyup.enter)="logIn()" class="form-control" placeholder="Mot de passe" /&gt;
    &lt;button (click)="logIn()" class="btn btn-primary btn-block btn-lg"&gt;Connexion&lt;/button&gt;
    &lt;span id="containerStayConnected" title="Non implémenté"&gt;&lt;input type="checkbox" id="stayConnected" [(ngModel)]="stayConnected" /&gt;&lt;label for="stayConnected"&gt;Restez connecté&lt;/label&gt;&lt;/span&gt;
    &lt;a id="forgetPassword" title="Non implémenté"&gt;Mot de passe oublié&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
    &lt;a routerLink="/inscription"&gt;S'inscrire&lt;/a&gt;&lt;br&gt;
    {{ error }}
  &lt;/div&gt;
  
  &lt;div class="confirmationMessage" *ngIf="activatedRoute.snapshot.params['keyWording'] == 'validateInscription'"&gt;&lt;br&gt;Un lien de confirmation vous a été envoyé sur votre boîte email afin de valider votre compte. Merci.&lt;/div&gt;
  
  &lt;div id="piedDePage"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>when running <strong>ng serve</strong> am not catching it .</p>
  
  <p><strong>Any propositions ??</strong></p>