title: How get document path in order to delete/edit a document in firestore?
body: <p>I'm testing the new firestore with ionic using <a href="https://github.com/angular/angularfire2" rel="nofollow noreferrer">angularfire2</a> and I'm able to list and create collections and documents following the documentation.</p>
  
  <p>These are the <a href="https://gist.github.com/danielnv18/4bb1d77dc0860493d717692939b8e47e" rel="nofollow noreferrer">ts and html</a> file that I use in order to list a collection of documents.</p>
  
  <p>According to the documentation in <a href="https://github.com/angular/angularfire2/blob/master/docs/firestore/documents.md#manipulating-documents" rel="nofollow noreferrer">github</a> I can use the delete() and update() methods in <code>AngularFirestoreDocument</code> but since I have a collection of documents I need the document path to do something like this <code>this.chemicalsCollection.doc('path/1).delete()</code> or <code>this.chemicalsCollection.doc('path/1).update()</code>.</p>
  
  <p>In the old days (last week) I could do something like this:</p>
  
  <pre><code>constructor(database: AngularFireDatabase) {
    this.itemsRef$ = this.database.list('items');
  }
  deleteItem(item) {
    this.itemsRef$.remove(item.$key)
  }
  </code></pre>
  
  <p>and loop <code>itemsRef$</code> in the html <code>*ngFor="let item of chemicalsRef$ | async" (click)="deleteItem(item)"</code>. The index <code>$key</code> came from the firebase database but if I do the same with firestore there's no <code>$key</code> or <code>path</code> in the object, just the data I created.</p>
  
  <p>What am I missing? how do I get the document's path?</p>