title: (Angularfire) Retrieve specific data from firebase database with id
body: <p>I'm trying to create a "blog" with angular and firebase. I'm doing fine for my first project with both Angular and Firebase.</p>
  
  <p>I made the frontpage where all the entries are loaded and then added a "read more..." hyperlink to the route of the specific article plus the id of the entry.
  Here's the HTML:</p>
  
  <pre><code>&lt;div style="background-color:white" class=" contenedorBlog"&gt;
  
      &lt;h1 style="padding-top:100px;" class="text-center mb-4"&gt;Pizarrón&lt;/h1&gt;
  
      &lt;div *ngFor="let item of items" style="padding:40px" class="rounded"&gt;
        &lt;h2&gt; {{item.title}} &lt;/h2&gt;
        &lt;p&gt;Date: {{ item.systemDate }}&lt;/p&gt;
        &lt;div class="content" [innerHTML]="item.content"&gt;&lt;/div&gt;
        &lt;a [routerLink]="['/article', item.id]"&gt;Read more...&lt;/a&gt;
      &lt;/div&gt;
  
    &lt;/div&gt;
  </code></pre>
  
  <p>And here's the HTML of the article component:</p>
  
  <pre><code>&lt;div style="background-color:white" class=" contenedorBlog"&gt;
  
      &lt;div style="padding:40px" class="rounded"&gt;
        &lt;h2&gt; {{items.title}} &lt;/h2&gt;
        &lt;p&gt;Fecha: {{ items.systemDate }}&lt;/p&gt;
        &lt;div class="content" [innerHTML]="items.content"&gt;&lt;/div&gt;
      &lt;/div&gt;
  
    &lt;/div&gt;
  </code></pre>
  
  <p>I'm trying to figure out how can i call the specific object having the id on the route (article/:id).</p>
  
  <p>this is what i have so far (article.component.ts)</p>
  
  <pre><code>export class ArticlesComponent implements OnInit {
  
     items:any;
  
     constructor(private blogService: UploadService, private route: ActivatedRoute) {
        this.route.params.subscribe(params=&gt; {
        this.items=this.blogService.getObjectById(params['id']);
     });
     }
  
     ngOnInit() {
     }
  
  }
  </code></pre>
  
  <p>Problem is... i don't know what to do next.
  I'm calling a function insde a service that i want to retrieve me ONLY the object that contains the id that's on the route.</p>
  
  <pre><code>getObjectById(id) {
      ///Help
  }
  </code></pre>
  
  <p>Thank you very much and sorry for my not that great english.</p>