title: Why am I able to access private member of the class?
body: <p>My code is as follow</p>
  
  <pre><code>@Component({
    selector: 'my-app',
    template: `
      &lt;ul&gt;
      &lt;li *ngFor = 'let hero1 of heros2'&gt;
      {{hero1.name}}
      &lt;/li&gt;
      &lt;/ul&gt;        
   `})
  
  export class AppComponent {   
  heros2 : any = [
      new heross('lee', 'lee'),
      new heross('lee1', 'lee1'),
  ];}
  
  class heross{
   private name : string;
   constructor(name : string, details : string){
       this.name = name; 
  }}
  bootstrap(AppComponent);
  </code></pre>
  
  <p>why am I able to access name in the view and displaying name, provided that I have given it private keyword</p>