title: Angular ERROR TS2341: Property 'X' is private and only accessible within class
body: <p>I'm doing an exercise code from an angular course.</p>
  <p>The app works but I have this error in my mac terminal, I'm doing it exactly as the course shows, can't find what's wrong.</p>
  <pre><code>Error: src/app/components/articles/articles.component.html:1:22 - error TS2341: Property 'articles' is private and only accessible within class 'ArticlesComponent'.
  
  1 &lt;h3&gt;Repositorios : {{articles.articlesCount}}&lt;/h3&gt;
  </code></pre>
  <p>Here es my service:</p>
  <pre class="lang-js prettyprint-override"><code>import { HttpClient } from '@angular/common/http';
  import { Injectable } from '@angular/core';
  
  
  @Injectable({
    providedIn: 'root'
  })
  export class ArticleService {
      public articlesCount : number = 30;
  
      constructor(private http: HttpClient) { }
  
      public getAll(){
              this.http.get('https://api.github.com/users/codigofacilito/repos').subscribe(data=&gt; {
              console.log(data);
      })
  }}
  </code></pre>
  <p>Heres is the article.component who consumes the service:</p>
  <pre class="lang-js prettyprint-override"><code>import { Component, OnInit } from '@angular/core';
  import {ArticleService} from '../../services/article.service';
  
  
  @Component({
    selector: 'app-articles',
    templateUrl: './articles.component.html',
    styleUrls: ['./articles.component.css']
  })
  export class ArticlesComponent implements OnInit {
  
      constructor(private articles : ArticleService) { }
  
      ngOnInit(){
        this.articles.getAll();
      }
  
  }
  </code></pre>
  <p>And the view HTML:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;h3&gt;Repositorios : {{articles.articlesCount}}&lt;/h3&gt;
  </code></pre>