TypeScript: use private or public in constructor
<p>I'm new to TypeScript world, and I've seen examples with this to deal with injected objects and set it to a property of the component (this.anything) </p>

<p>First with public and setting by hand to this.nav</p>

<pre><code>export class XPTO {
   constructor(public nav: NavController) {
      this.nav = nav;
   }
}
</code></pre>

<p>and this, with private</p>

<pre><code>export class XPTO {
   constructor(private nav: NavController) {
      //this.nav is nav?
   }
}
</code></pre>

<p>in both cases after construct the object this.nav is a NavController object.
What are the differences of both implementations? Or this is the same when compiled to plain javascript?</p>