title: Firestore: set post id
body: <p>How can I set id of post that I'm adding? I thought that <code>getItemNextKey()</code> returns id that will be assigned for the post, but it's not. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>AddItem(data, downloadURLs) {
      data.id= this.getItemNextKey(); // Persist a document id
      data.upload = downloadURLs;
      // console.log('this.uploadService.downloadURLs: ' + downloadURLs);
      // console.log('data.upload: ' + data.upload);
  
      this.db.collection('items').add(data);
    }</code></pre>
  </div>
  </div>
  </p>